From 4c01310efa7cf4f282e3a652282f01cfa30b4c2a Mon Sep 17 00:00:00 2001 From: Hunter T Date: Thu, 14 Mar 2024 16:54:55 -0700 Subject: [PATCH] Format with clang-format --- .../PSExecutorTests.cs | 16 +++++-- .../ActiveDirectory/ADCommandParameters.cs | 2 +- ActiveDirectoryQuerier/MainWindowViewModel.cs | 42 +++++++------------ .../PowerShell/PSExecutor.cs | 2 +- .../Queries/CustomQueries.cs | 3 +- 5 files changed, 31 insertions(+), 34 deletions(-) diff --git a/ActiveDirectoryQuerier.Tests/PSExecutorTests.cs b/ActiveDirectoryQuerier.Tests/PSExecutorTests.cs index 2dcf274..ae5f78b 100644 --- a/ActiveDirectoryQuerier.Tests/PSExecutorTests.cs +++ b/ActiveDirectoryQuerier.Tests/PSExecutorTests.cs @@ -9,7 +9,9 @@ public class PSExecutorTests [Theory] [InlineData("Get-Command", "Module", "ActiveDirectory")] [InlineData("Get-Process", "Name", "explorer")] - public void Execute_WhenGivenValidCommand_ReturnsExpectedOutput(string command, string parameter, string parameterValue) + public void Execute_WhenGivenValidCommand_ReturnsExpectedOutput(string command, + string parameter, + string parameterValue) { // Arrange Command psCommand = new(command); @@ -46,7 +48,9 @@ public void Execute_CheckIfOutputChanged_ReturnsDifferentOutput() [Theory] [InlineData("Get-Command", "Module", "ActiveDirectory")] [InlineData("Get-Process", "Name", "explorer")] - public async Task ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(string command, string parameter, string parameterValue) + public async Task ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(string command, + string parameter, + string parameterValue) { // Arrange Command psCommand = new(command); @@ -65,7 +69,9 @@ public async Task ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(strin [Theory] [InlineData("Get-ADUser", "InvalidParameter", "*")] [InlineData("InvalidCommand", "Filter", "*")] - public void Execute_WhenGivenInvalidCommand_ReturnsExpectedOutput(string command, string parameter, string parameterValue) + public void Execute_WhenGivenInvalidCommand_ReturnsExpectedOutput(string command, + string parameter, + string parameterValue) { // Arrange Command psCommand = new(command); @@ -84,7 +90,9 @@ public void Execute_WhenGivenInvalidCommand_ReturnsExpectedOutput(string command [Theory] [InlineData("Get-ADUser", "InvalidParameter", "*")] [InlineData("InvalidCommand", "Filter", "*")] - public async Task ExecuteAsync_WhenGivenInvalidCommand_ReturnsExpectedOutput(string command, string parameter, string parameterValue) + public async Task ExecuteAsync_WhenGivenInvalidCommand_ReturnsExpectedOutput(string command, + string parameter, + string parameterValue) { // Arrange Command psCommand = new(command); diff --git a/ActiveDirectoryQuerier/ActiveDirectory/ADCommandParameters.cs b/ActiveDirectoryQuerier/ActiveDirectory/ADCommandParameters.cs index 25eebd3..2b5b107 100644 --- a/ActiveDirectoryQuerier/ActiveDirectory/ADCommandParameters.cs +++ b/ActiveDirectoryQuerier/ActiveDirectory/ADCommandParameters.cs @@ -9,7 +9,7 @@ namespace ActiveDirectoryQuerier.ActiveDirectory; public class ADCommandParameters { private readonly ObservableCollection _availableParameters = new(); - + /// /// /// This property should not be accessed before LoadAvailableParametersAsync or LoadAvailableParameters has been diff --git a/ActiveDirectoryQuerier/MainWindowViewModel.cs b/ActiveDirectoryQuerier/MainWindowViewModel.cs index 1f30b7d..679b17b 100644 --- a/ActiveDirectoryQuerier/MainWindowViewModel.cs +++ b/ActiveDirectoryQuerier/MainWindowViewModel.cs @@ -109,12 +109,11 @@ public Command? SelectedCommandFromComboBoxInQueryBuilder } } } - + public Command? SelectedCommandFromComboBoxInActiveDirectoryInfo { get => _selectedCommandFromComboBoxInActiveDirectoryInfo; - set - { + set { if (_selectedCommandFromComboBoxInActiveDirectoryInfo != value) { _selectedCommandFromComboBoxInActiveDirectoryInfo = value; @@ -122,13 +121,10 @@ public Command? SelectedCommandFromComboBoxInActiveDirectoryInfo } } } - - public List AvailableOptionsFromComboBoxInActiveDirectoryInfo { get; } = new() - { - "Get user on domain", - "Get computers on domain", - "Get IP of each system on domain" - }; + + public List AvailableOptionsFromComboBoxInActiveDirectoryInfo { + get; + } = new() { "Get user on domain", "Get computers on domain", "Get IP of each system on domain" }; public ObservableCollection