PabloDispatch 0.1.0-alpha
See the version list below for details.
dotnet add package PabloDispatch --version 0.1.0-alpha
NuGet\Install-Package PabloDispatch -Version 0.1.0-alpha
<PackageReference Include="PabloDispatch" Version="0.1.0-alpha" />
paket add PabloDispatch --version 0.1.0-alpha
#r "nuget: PabloDispatch, 0.1.0-alpha"
// Install PabloDispatch as a Cake Addin #addin nuget:?package=PabloDispatch&version=0.1.0-alpha&prerelease // Install PabloDispatch as a Cake Tool #tool nuget:?package=PabloDispatch&version=0.1.0-alpha&prerelease
PabloDispatch Library Readme
Introduction
PabloDispatch is a C# library designed to simplify and implement the Command Query Responsibility Segregation (CQRS) pattern in your application. CQRS is a design pattern that separates the read and write operations, treating them as distinct responsibilities.
Note: Parts of this readme file was written with the help of ChatGPT, an AI language model developed by OpenAI.
How PabloDispatch Works
PabloDispatch provides a set of interfaces and components that help you effectively organize your application using CQRS principles. Here's an overview of key components:
Requests and Handlers: The library includes marker interfaces
IRequest
andIRequest<TResponse>
representing requests without and with a return type, respectively. It also definesIRequestHandler<TRequest, TResponse>
andIRequestHandler<TRequest>
interfaces to define handlers for processing these requests.Pipeline Handlers: PabloDispatch provides
IRequestPipelineHandler<TRequest>
andIRequestPipelineHandler<TRequest, TResult>
interfaces for pre- and post-processing of requests. These pipeline handlers allow you to add additional behavior before and after the main request is processed.Dispatcher: The
IPabloDispatcher
interface represents a request dispatcher. It is responsible for identifying the appropriate handler for a given request and dispatching it for processing.
How to Use PabloDispatch
Registration
To start using the PabloDispatch library, you need to register its components in your application's dependency injection container. Here's how you can do it:
// In your startup or composition root class:
public void ConfigureServices(IServiceCollection services)
{
// Register the PabloDispatch components using the extension method.
services.AddPabloDispatch(component =>
{
component.SetRequestHandler<YourRequestType, YourRequestHandlerType>()
});
}
Note on Alpha Version
Please be aware that PabloDispatch is currently in the alpha stage, which means it's still undergoing early testing and development. As a result, changes may occur in subsequent releases as I refine and improve the library.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0-alpha | 126 | 12/26/2023 |
1.1.0-alpha | 95 | 7/26/2023 |
0.1.0-alpha | 91 | 7/18/2023 |