LiteBus.Commands.Extensions.MicrosoftDependencyInjection 0.24.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package LiteBus.Commands.Extensions.MicrosoftDependencyInjection --version 0.24.1
                    
NuGet\Install-Package LiteBus.Commands.Extensions.MicrosoftDependencyInjection -Version 0.24.1
                    
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="LiteBus.Commands.Extensions.MicrosoftDependencyInjection" Version="0.24.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteBus.Commands.Extensions.MicrosoftDependencyInjection" Version="0.24.1" />
                    
Directory.Packages.props
<PackageReference Include="LiteBus.Commands.Extensions.MicrosoftDependencyInjection" />
                    
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 LiteBus.Commands.Extensions.MicrosoftDependencyInjection --version 0.24.1
                    
#r "nuget: LiteBus.Commands.Extensions.MicrosoftDependencyInjection, 0.24.1"
                    
#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.
#:package LiteBus.Commands.Extensions.MicrosoftDependencyInjection@0.24.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LiteBus.Commands.Extensions.MicrosoftDependencyInjection&version=0.24.1
                    
Install as a Cake Addin
#tool nuget:?package=LiteBus.Commands.Extensions.MicrosoftDependencyInjection&version=0.24.1
                    
Install as a Cake Tool

<h1 align="center"> <br> <a href="https://github.com/litenova/LiteBus"> <img src="assets/logo/icon.png"> </a> <br> LiteBus <br> </h1>

<h4 align="center">An easy-to-use and ambitious in-process mediator to implement CQS</h4>

<p align="center">

<a href="https://github.com/litenova/LiteBus/actions/workflows/release.yml"> <img src="https://github.com/litenova/LiteBus/actions/workflows/release.yml/badge.svg" alt="CI/CD Badge" /> </a>

<a href="https://codecov.io/gh/litenova/LiteBus" > <img src="https://codecov.io/gh/litenova/LiteBus/graph/badge.svg?token=XBNYITSV5A" alt="Code Coverage Badge" /> </a>

<a href="https://www.nuget.org/packages/LiteBus"> <img src="https://img.shields.io/nuget/vpre/LiteBus.svg" alt="LiteBus Nuget Version" /> </a> </p>

<p align="center"> For a detailed understanding and advanced use cases, please refer to the <a href="https://github.com/litenova/LiteBus/wiki"><b>Wiki</b></a>. </p>

Features

  • Developed with .NET 8.0
  • Independent (No external dependencies)
  • Reduced use of reflection
  • Provides polymorphic dispatch and handling of messages with support for covariance and contravariance
  • Core Messaging Types include:
    • ICommand: Command without result
    • ICommand<TResult>: Command with a result
    • IQuery<TResult>: Query
    • IStreamQuery<TResult>: Query yielding IAsyncEnumerable<TResult>
    • IEvent: Event
  • Designed for flexibility and extensibility
  • Modular architecture: Abstractions and implementations are provided in distinct packages
  • Allows ordering of handlers
  • Can handle plain messages (class types without specific interface implementations)
  • Supports generic messages
  • Features both global and individual pre and post handlers. These handlers also support covariance and contravariance
  • Events do not necessarily need to inherit from IEvent, accommodating DDD scenarios. This is beneficial for maintaining clean domain events without binding them to any particular library interface.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on LiteBus.Commands.Extensions.MicrosoftDependencyInjection:

Package Downloads
LiteBus.Extensions.MicrosoftDependencyInjection

LiteBus is a lightweight, flexible in-process mediator for implementing Command Query Separation (CQS) patterns in .NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.3 58 2 days ago
2.2.2 74 2 days ago
2.2.1 366 12 days ago
2.2.0 164 12 days ago
2.1.0 211 19 days ago
2.0.0 1,456 3 months ago
1.1.0 178 3 months ago
1.0.0 98 3 months ago
0.25.1 194 3 months ago
0.25.0 185 3 months ago
0.24.4 168 3 months ago
0.24.3 2,578 5/2/2024
0.24.2 200 4/16/2024
0.24.1 160 1/30/2024
0.23.1 1,665 1/11/2024
0.23.0 225 12/23/2023
0.22.0 179 12/23/2023
0.21.0 145 12/18/2023
0.20.2 184 12/8/2023
0.20.1 166 12/5/2023
0.20.0 873 12/5/2023
0.19.1 189 11/25/2023
0.19.0 177 11/23/2023
0.18.4 174 11/23/2023
0.18.3 158 11/23/2023
0.18.2 153 11/22/2023
0.18.1 627 11/6/2023
0.18.0 214 11/1/2023
0.17.1 170 10/20/2023
0.16.0 207 9/26/2023
0.15.1 2,260 6/23/2023
0.15.0 213 6/23/2023
0.14.1 235 6/22/2023
0.14.0 500 11/30/2022
0.13.0 574 10/7/2022
0.12.0 4,372 1/6/2022
0.11.3 3,951 12/27/2021
0.11.2 460 12/27/2021
0.11.1 403 12/26/2021
0.11.0 449 12/23/2021
0.10.2 422 12/22/2021
0.10.1 431 12/20/2021
0.10.0 539 12/15/2021
0.9.1 883 10/25/2021
0.9.0 541 10/25/2021
0.8.1 2,924 10/9/2021
0.8.0 1,616 9/7/2021
0.7.0 735 8/19/2021
0.6.3 916 8/9/2021
0.6.2 542 8/9/2021
0.6.1 525 8/9/2021
0.6.0 565 8/9/2021
0.5.0 502 7/8/2021
0.4.0 458 4/13/2021
0.3.1 413 4/13/2021
0.2.1 439 4/9/2021
0.2.0 431 4/6/2021
0.1.0 475 3/17/2021

# Changelog

## v.0.24.1
- Add `Tags` to `IExecutionContext`.

## v.0.24.0
- Upgraded to .NET 8.

## v.0.23.1
- Add `QueryMediatorExtensions` for backward compatibility.
- Add `CommandMediatorExtensions` for backward compatibility.
- Add `EventMediatorExtensions` for backward compatibility.

## v.0.23.0
- Fix the missing `Exception` parameter in `IAsyncMessageErrorHandler[TMessage, TMessageResult]` and `IAsyncMessageErrorHandler[TMessage]` interfaces.

## v.0.22.0
- Introduce tag-based handler filtering through `HandlerTag` and `HandlerTags` attributes.
- Add `CommandMediationSettings` to `ICommandMediator` to allow configuring command mediation.
- Add `QueryMediationSettings` to `IQueryMediator` to allow configuring query mediation.

## v.0.21.0
- Fixed Query, Event, and Command error handlers returning `object` instead of `Task`.

## v.0.20.2
- Refined Handle Descriptors
- Removed Any Usage of Reflection in `MessageDependencies`
- Removed Some Redundant Code From Descriptors

## v.0.20.1
- Rename `AddMessaging` method to `AddMessageModule`.

## v.0.20.0
- Revert TargetFramework to NET 7

## v.0.19.1
- Add `ThrowOnNoHandlers` to `EventMediationSettings` to allow throwing an exception when no handlers are found for an event.
- Fixed a bug where the pre and post handlers were being executed even when no main handlers were found.

## v.0.19.0
- Upgraded to .NET 8.

## v.0.18.4
- Rename `FilterHandler` to `HandlerFilter` on `EventMediationSettings` as it is more concise and directly states that it is a filter for handlers.

## v.0.18.3
- Add `EventMediationSettings` to IEventMediator to allow configuring event mediation.
- Add `FilterHandler` to `EventMediationSettings` to allow filtering event handlers.

## v.0.18.2
- Preserve the stack trace when rethrowing an exception in case there are no error handlers.

## v.0.18.1
- Make execution of event handlers synchronous by default.

## v.0.18.0
- All post handlers expose message result as the second parameter.
- Fixed a bug where IEventPreHandler was not asynchronous.
- Added more unit tests.

## v.0.17.1
- Add `Items` property to `IExecutionContext` to allow passing data between handlers.

## v.0.17.0
- Rename `AddCommands` method to `AddCommandModule`.
- Rename `AddEvents` method to `AddEventModule`.
- Rename `AddQueries` method to `AddQueryModule`.

## v.0.16.0
- Introduced execution context using AsyncLocal functionality, accessible through AmbientExecutionContext.
- Renamed `RegisterFrom` to `RegisterFromAssembly` in module builders.
- Standardized namespace for all files in the `LiteBus.Messaging.Abstractions` project to `LiteBus.Messaging.Abstractions`, irrespective of folder path.
- Removed `HandleContext` as a parameter from post and pre handlers.

## v.0.15.1
- Removed `IEvent` constraint from event handlers, allowing objects to be passed as events without implementing the `IEvent` interface.

## v.0.15.0
- Added overload method to event publisher for passing an object as a message.
- Removed `LiteBus` prefix from module constructor names.

## v.0.14.1
- Upgraded dependency packages.

## v.0.14.0
- Upgraded to .NET 7.

## v.0.13.0
- Replaced `ICommandBase` with `ICommand`.
- Replaced `IQueryBase` with `IQuery`.
- Renamed `ILiteBusModule` to `IModule`.
- Removed methods `RegisterPreHandler`, `RegisterHandler`, and `RegisterPostHandler`, replacing them with `Register`.
- Removed superfluous base interfaces.

## v.0.12.0
- Added support to message registry for registering any class type as a message.

## v.0.11.3
- Fixed bug: Execute error handlers instead of pre handlers during error phase.

## v.0.11.2
- Fixed bug: Considered the count of indirect error handlers when determining if an exception should be rethrown.

## v.0.11.1
- Disabled nullable reference types.
- Ensured error handlers cover errors in pre and post handlers.

## v.0.11.0
- Introduced non-generic message registration overloads for events, queries, and messaging configuration.
- Removed the sample project.
- Added unit tests for events and queries.