diff --git a/ActiveDirectoryQuerier/MainWindowViewModel.cs b/ActiveDirectoryQuerier/MainWindowViewModel.cs index 91ccc2e..b790262 100644 --- a/ActiveDirectoryQuerier/MainWindowViewModel.cs +++ b/ActiveDirectoryQuerier/MainWindowViewModel.cs @@ -153,10 +153,8 @@ public bool IsQueryEditingEnabled public ObservableCollection ADCommands { get; private set; } // ReSharper disable once InconsistentNaming public ObservableCollection? AvailableADCommandParameters { get; private set; } - // TODO: Rename // ReSharper disable once InconsistentNaming public ObservableCollection DynamicallyAvailableADCommandParameterComboBoxes { get; } - // TODO: Rename // ReSharper disable once InconsistentNaming public ObservableCollection DynamicallyAvailableADCommandParameterValueTextBoxes { get; } @@ -228,7 +226,11 @@ public MainWindowViewModel() // [ Methods ] ----------------------------------------------------------------- // - // TODO: Hunter: Re-review this method and make any necessary changes. + /// + /// The use of the command parameter indicates that the method can be called from the Query Stack Panel. + /// On the other hand, the absence of the command parameter and use of the + /// SelectedCommandInQueryBuilder property indicates that the method can be called from the Query Builder. + /// private async Task ExecuteQueryAsync(ConsoleViewModel consoleOutput, Command? command = null) { if (SelectedCommandInQueryBuilder is null && command is null) @@ -346,7 +348,8 @@ private void EditQueryFromQueryStackPanel(object queryButton) DynamicallyAvailableADCommandParameterComboBoxes.Clear(); DynamicallyAvailableADCommandParameterValueTextBoxes.Clear(); } - + + // TODO: Fix nullability warning. // Fill in Parameters and values for (var i = 0; i < currentQuery.PSCommandParameters.Length; i++) { diff --git a/ActiveDirectoryQuerier/Queries/Query.cs b/ActiveDirectoryQuerier/Queries/Query.cs index cbb3be3..880b394 100644 --- a/ActiveDirectoryQuerier/Queries/Query.cs +++ b/ActiveDirectoryQuerier/Queries/Query.cs @@ -6,10 +6,14 @@ namespace ActiveDirectoryQuerier.Queries; public class Query { /// - /// Command that should help with Binding the command to the query for the buttons sake + /// Used for the name of the custom Query /// - [JsonIgnore] - public Command? Command { get; set; } + public string QueryName { get; set; } = string.Empty; + + /// + /// Used for the Custom Queries Description + /// + public string QueryDescription { get; set; } = string.Empty; /// /// Used for serializing the Command Name @@ -28,16 +32,12 @@ public class Query /// // ReSharper disable once InconsistentNaming public string[]? PSCommandParameterValues { get; set; } - + /// - /// Used for the name of the custom Query - /// - public string? QueryName { get; set; } - - /// - /// Used for the Custom Queries Description + /// Command that should help with Binding the command to the query for the buttons sake /// - public string? QueryDescription { get; set; } + [JsonIgnore] + public Command? Command { get; set; } public Query(string psCommandName) {