Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
olivegamestudio committed Aug 24, 2024
2 parents fafe519 + 1097aa4 commit c48417b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Utility.Toolkit.Tests/Utility.Toolkit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
<PackageReference Include="NUnit" Version="3.14.*" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.*" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.*" />
Expand Down
28 changes: 28 additions & 0 deletions Utility.Toolkit/ICommandAsync_T.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;

namespace Utility.Toolkit;

/// <summary>
/// Defines a command with a single generic parameter.
/// </summary>
/// <typeparam name="T">The type of parameter used by the command.</typeparam>
public interface ICommandAsync<in T>
{
/// <summary>
/// Occurs when changes occur that affect whether the command should execute.
/// </summary>
event AsyncEventHandler CanExecuteChanged;

/// <summary>
/// Determines whether the command can execute in its current state with the given parameter.
/// </summary>
/// <param name="parameter">Data used by the command.</param>
/// <returns>true if this command can be executed; otherwise, false.</returns>
bool CanExecute(T parameter);

/// <summary>
/// Executes the command with the given parameter.
/// </summary>
/// <param name="parameter">Data used by the command.</param>
void Execute(T parameter);
}
1 change: 1 addition & 0 deletions Utility.Toolkit/Utility.Toolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Utility.Helpers" Version="*" />
</ItemGroup>

</Project>

0 comments on commit c48417b

Please sign in to comment.