Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Mar 16, 2024
1 parent 5d1f299 commit ed2b485
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Command? SelectedCommandFromComboBoxInQueryBuilder
// No need to load parameters if the command is null.
if (value is not null)
{
// TODO: Figure out how to resolve the warning about the async method not being awaited!!!
// TODO: Figure out how to resolve the warning about the async method not being awaited...
LoadCommandParametersAsync(value);

Check warning on line 110 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 110 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
}
}
Expand Down Expand Up @@ -161,18 +161,8 @@ public string? SelectedCommandFromComboBoxInActiveDirectoryInfo
public ICommand ClearConsoleOutputInQueryBuilderRelay { get; }
public ICommand ImportQueryFileRelay { get; }
public ICommand CreateNewQueryFileRelay { get; }
public ICommand ClearConsoleOutputInActiveDirectoryInfoRelay { get; } // TODO: Impliment functionality.....

/* TODO: for Pieter
*
* Create a property that contains the ComboBox dropdown options/text.
*
* Create a property that will contain the selected item.
*
* Create a property to act as the relay to the execution button.
*/

// NEW CODE
public ICommand ClearConsoleOutputInActiveDirectoryInfoRelay { get; }

// [ Constructor ] ------------------------------------------------------------- //

public MainWindowViewModel()
Expand Down Expand Up @@ -210,8 +200,7 @@ public MainWindowViewModel()
ClearConsoleOutputInActiveDirectoryInfoRelay = new RelayCommand(
_ => ClearConsoleOutput(_consoleOutputInActiveDirectoryInfo));
ClearQueryBuilderRelay = new RelayCommand(ClearQueryBuilder);

// TODO: Figure out how resolve the warning about the async method not being awaited.

InitializeActiveDirectoryCommandsAsync();
LoadSavedQueriesFromFile(); // Calls method to deserialize and load buttons.
}
Expand Down Expand Up @@ -430,8 +419,9 @@ private async void InitializeActiveDirectoryCommandsAsync()
ADCommands = new ObservableCollection<Command>(list);
OnPropertyChanged(nameof(ADCommands));
}
#pragma warning restore S3168

private async void LoadCommandParametersAsync(Command? selectedCommand)
private async Task LoadCommandParametersAsync(Command? selectedCommand)
{
ADCommandParameters adCommandParameters = new();
await adCommandParameters.LoadAvailableParametersAsync(selectedCommand);
Expand All @@ -445,7 +435,6 @@ private async void LoadCommandParametersAsync(Command? selectedCommand)
comboBoxParameterViewModel.AvailableParameters = AvailableADCommandParameters;
}
}
#pragma warning restore S3168

// TODO: Hunter: Re-review this method and make any necessary changes.
private async Task ExecuteQueryCoreAsync(AppConsole appConsole, Command? command = null)
Expand Down

0 comments on commit ed2b485

Please sign in to comment.