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

Commit

Permalink
Update comments and slight refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Mar 21, 2024
1 parent 8e3f463 commit 4cb30dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
11 changes: 7 additions & 4 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ public bool IsQueryEditingEnabled
public ObservableCollection<Command> ADCommands { get; private set; }
// ReSharper disable once InconsistentNaming
public ObservableCollection<string>? AvailableADCommandParameters { get; private set; }
// TODO: Rename
// ReSharper disable once InconsistentNaming
public ObservableCollection<ComboBoxParameterViewModel> DynamicallyAvailableADCommandParameterComboBoxes { get; }
// TODO: Rename
// ReSharper disable once InconsistentNaming
public ObservableCollection<TextBoxViewModel> DynamicallyAvailableADCommandParameterValueTextBoxes { get; }

Expand Down Expand Up @@ -228,7 +226,11 @@ public MainWindowViewModel()

// [ Methods ] ----------------------------------------------------------------- //

// TODO: Hunter: Re-review this method and make any necessary changes.
/// <remarks>
/// The use of the <c>command</c> parameter indicates that the method can be called from the Query Stack Panel.
/// On the other hand, the absence of the <c>command</c> parameter and use of the
/// <c>SelectedCommandInQueryBuilder</c> property indicates that the method can be called from the Query Builder.
/// </remarks>
private async Task ExecuteQueryAsync(ConsoleViewModel consoleOutput, Command? command = null)
{
if (SelectedCommandInQueryBuilder is null && command is null)
Expand Down Expand Up @@ -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++)

Check warning on line 354 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Dereference of a possibly null reference.

Check warning on line 354 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Dereference of a possibly null reference.

Check warning on line 354 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Dereference of a possibly null reference.
{
Expand Down
22 changes: 11 additions & 11 deletions ActiveDirectoryQuerier/Queries/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ namespace ActiveDirectoryQuerier.Queries;
public class Query
{
/// <summary>
/// Command that should help with Binding the command to the query for the buttons sake
/// Used for the name of the custom Query
/// </summary>
[JsonIgnore]
public Command? Command { get; set; }
public string QueryName { get; set; } = string.Empty;

/// <summary>
/// Used for the Custom Queries Description
/// </summary>
public string QueryDescription { get; set; } = string.Empty;

/// <summary>
/// Used for serializing the Command Name
Expand All @@ -28,16 +32,12 @@ public class Query
/// </summary>
// ReSharper disable once InconsistentNaming
public string[]? PSCommandParameterValues { get; set; }

/// <summary>
/// Used for the name of the custom Query
/// </summary>
public string? QueryName { get; set; }

/// <summary>
/// Used for the Custom Queries Description
/// Command that should help with Binding the command to the query for the buttons sake
/// </summary>
public string? QueryDescription { get; set; }
[JsonIgnore]
public Command? Command { get; set; }

public Query(string psCommandName)
{
Expand Down

0 comments on commit 4cb30dd

Please sign in to comment.