Simple patronusr implementation in .NET
Supports request/response, commands, queries via C# generic variance.
You should install PatronusR with NuGet:
Install-Package PatronusR
Or via the .NET Core command line interface:
dotnet add package PatronusR
PatronusR supports Microsoft.Extensions.DependencyInjection.Abstractions directly. To register various PatronusR services and handlers:
services.AddPatronusR(cfg => cfg.RegisterServicesFromAssemblyContaining<Startup>());
or with an assembly:
services.AddPatronusR(cfg => cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly));
This registers:
IPatronusRas ScopedISenderas Scoped
To register behaviors, stream behaviors, pre/post processors:
services.AddPatronusR(cfg => {
cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly);
});