-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update command bus to use source generation and switch pipeline to Va…
…lueTask to reduce allocations
- Loading branch information
1 parent
e6c3344
commit 2fac9cb
Showing
107 changed files
with
271 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Fragment.NetSlum.Server" type="DotNetProject" factoryName=".NET Project"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Fragment.NetSlum.Server/bin/Debug/net8.0/Fragment.NetSlum.Server.exe" /> | ||
<option name="PROGRAM_PARAMETERS" value="" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Fragment.NetSlum.Server/bin/Debug/net8.0" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/src/Fragment.NetSlum.Server/Fragment.NetSlum.Server.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Fragment.NetSlum.Core/CommandBus/Contracts/Commands/ICommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using MediatR; | ||
using Mediator; | ||
|
||
namespace Fragment.NetSlum.Core.CommandBus.Contracts.Commands; | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
src/Fragment.NetSlum.Core/CommandBus/Contracts/Commands/ICommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using MediatR; | ||
using Mediator; | ||
|
||
namespace Fragment.NetSlum.Core.CommandBus.Contracts.Commands; | ||
|
||
public interface ICommandHandler<in TCommand, TResult> where TCommand : ICommand<TResult> | ||
{ | ||
public Task<TResult> Handle(TCommand command, CancellationToken cancellationToken); | ||
public ValueTask<TResult> Handle(TCommand command, CancellationToken cancellationToken); | ||
} | ||
|
||
public interface ICommandHandler<in TCommand> : ICommandHandler<TCommand, Unit> where TCommand : ICommand {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Fragment.NetSlum.Core/CommandBus/Contracts/Events/IEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using MediatR; | ||
using Mediator; | ||
|
||
namespace Fragment.NetSlum.Core.CommandBus.Contracts.Events; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Fragment.NetSlum.Core/CommandBus/Contracts/Queries/IQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using MediatR; | ||
using Mediator; | ||
|
||
namespace Fragment.NetSlum.Core.CommandBus.Contracts.Queries; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.