init backend
This commit is contained in:
5
dotnet/AipsCore/Application/Abstract/Command/ICommand.cs
Normal file
5
dotnet/AipsCore/Application/Abstract/Command/ICommand.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
namespace AipsCore.Application.Abstract.Command;
|
||||
|
||||
public interface ICommand {}
|
||||
|
||||
public interface ICommand<TResult> {}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace AipsCore.Application.Abstract.Command;
|
||||
|
||||
public interface ICommandHandler<in TCommand>
|
||||
where TCommand : ICommand
|
||||
{
|
||||
Task Handle(TCommand command, CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public interface ICommandHandler<in TCommand, TResult>
|
||||
where TCommand : ICommand<TResult>
|
||||
{
|
||||
Task<TResult> Handle(TCommand command, CancellationToken cancellationToken = default);
|
||||
}
|
||||
3
dotnet/AipsCore/Application/Abstract/Query/IQuery.cs
Normal file
3
dotnet/AipsCore/Application/Abstract/Query/IQuery.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace AipsCore.Application.Abstract.Query;
|
||||
|
||||
public interface IQuery<TResult> {}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace AipsCore.Application.Abstract.Query;
|
||||
|
||||
public interface IQueryHandler<in TQuery, TResult>
|
||||
where TQuery : IQuery<TResult>
|
||||
{
|
||||
Task<TResult> HandleAsync(TQuery query, CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user