PabloDispatch 0.1.0-alpha

This is a prerelease version of PabloDispatch.
There is a newer prerelease version of this package available.
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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PabloDispatch" Version="0.1.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PabloDispatch --version 0.1.0-alpha                
#r "nuget: PabloDispatch, 0.1.0-alpha"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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:

  1. Requests and Handlers: The library includes marker interfaces IRequest and IRequest<TResponse> representing requests without and with a return type, respectively. It also defines IRequestHandler<TRequest, TResponse> and IRequestHandler<TRequest> interfaces to define handlers for processing these requests.

  2. Pipeline Handlers: PabloDispatch provides IRequestPipelineHandler<TRequest> and IRequestPipelineHandler<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.

  3. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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