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

Commit

Permalink
Change return type of async from void to Task
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Feb 27, 2024
1 parent 923b841 commit 0a1f7fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ActiveDirectoryQuerier.Tests/PowerShellExecutorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void Execute_CheckIfOutputChanged_ReturnsDifferentOutput()
[Theory]
[InlineData("Get-Command", "Module", "ActiveDirectory")]
[InlineData("Get-Process", "Name", "explorer")]
public async void ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(string cmd,
public async Task ExecuteAsync_WhenGivenValidCommand_ReturnsExpectedOutput(string cmd,
string paramName,
string paramValue)
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public void Execute_WhenGivenInvalidCommand_ReturnsExpectedOutput(string cmd, st
[Theory]
[InlineData("Get-ADUser", "InvalidParameter", "*")]
[InlineData("InvalidCommand", "Filter", "*")]
public async void ExecuteAsync_WhenGivenInvalidCommand_ReturnsExpectedOutput(string cmd,
public async Task ExecuteAsync_WhenGivenInvalidCommand_ReturnsExpectedOutput(string cmd,
string paramName,
string paramValue)
{
Expand Down
4 changes: 2 additions & 2 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private async void ExecuteCommandAsync(object _)
/// <summary>
/// Initializes the list of Active Directory commands asynchronously.
/// </summary>
private async void InitializeActiveDirectoryCommandsAsync()
private async Task InitializeActiveDirectoryCommandsAsync()
{
ObservableCollection<Command> list = await ActiveDirectoryCommands.GetActiveDirectoryCommands();
ActiveDirectoryCommandsList = new(list);
Expand All @@ -382,7 +382,7 @@ private async void InitializeActiveDirectoryCommandsAsync()
/// Loads the parameters for the selected PowerShell command asynchronously.
/// </summary>
/// <param name="selectedCommand">The PowerShell command whose parameters are to be loaded.</param>
private async void LoadCommandParametersAsync(Command? selectedCommand)
private async Task LoadCommandParametersAsync(Command? selectedCommand)
{
CommandParameters commandParameters = new();
await commandParameters.LoadCommandParametersAsync(selectedCommand);
Expand Down

0 comments on commit 0a1f7fa

Please sign in to comment.