Toolsfactory.Common.Mediator.Abstractions 0.2.2

dotnet add package Toolsfactory.Common.Mediator.Abstractions --version 0.2.2
                    
NuGet\Install-Package Toolsfactory.Common.Mediator.Abstractions -Version 0.2.2
                    
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="Toolsfactory.Common.Mediator.Abstractions" Version="0.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Toolsfactory.Common.Mediator.Abstractions" Version="0.2.2" />
                    
Directory.Packages.props
<PackageReference Include="Toolsfactory.Common.Mediator.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Toolsfactory.Common.Mediator.Abstractions --version 0.2.2
                    
#r "nuget: Toolsfactory.Common.Mediator.Abstractions, 0.2.2"
                    
#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.
#addin nuget:?package=Toolsfactory.Common.Mediator.Abstractions&version=0.2.2
                    
Install Toolsfactory.Common.Mediator.Abstractions as a Cake Addin
#tool nuget:?package=Toolsfactory.Common.Mediator.Abstractions&version=0.2.2
                    
Install Toolsfactory.Common.Mediator.Abstractions as a Cake Tool

Toolsfactory.Common Mediator Implementation

The Toolsfactory.Common.Mediator library implements the Mediator pattern to decouple the sender and receiver of requests. It provides a centralized mechanism for handling commands, queries, and notifications in a clean and extensible way.

Key Features

  • Command Handling: Send commands with or without return values to their respective handlers.
  • Query Handling: Execute queries and retrieve results from their handlers.
  • Notification Publishing: Publish notifications to all registered handlers.
  • Pipeline Behaviors: Add custom behaviors (e.g., logging, validation, or caching) around request processing.
  • Zero-Allocation Logging: Efficient logging using source generators for better performance.

Usage

  1. Register the Mediator: Use the AddMediator extension method to register the Mediator and all handlers in your dependency injection container.

  2. Send Commands and Queries: Use the IMediator interface to send commands or queries.

  3. Publish Notifications: Publish notifications to all registered handlers.

Benefits

  • Decoupled Architecture: Simplifies communication between components by removing direct dependencies.
  • Extensibility: Easily add custom behaviors using pipeline extensions.
  • Performance: Optimized for high-performance scenarios with zero-allocation logging and caching.

This library is designed for modern .NET applications targeting .NET 9 and leverages advanced features like dependency injection & logging.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Toolsfactory.Common.Mediator.Abstractions:

Package Downloads
Toolsfactory.Common.Mediator

A small library providing a minimal mediator implementation.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.2 212 5/12/2025
0.1.1 68 5/9/2025