Biss.Mediator.Extensions.DependencyInjection 2.0.0

dotnet add package Biss.Mediator.Extensions.DependencyInjection --version 2.0.0
                    
NuGet\Install-Package Biss.Mediator.Extensions.DependencyInjection -Version 2.0.0
                    
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="Biss.Mediator.Extensions.DependencyInjection" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Biss.Mediator.Extensions.DependencyInjection" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Biss.Mediator.Extensions.DependencyInjection" />
                    
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 Biss.Mediator.Extensions.DependencyInjection --version 2.0.0
                    
#r "nuget: Biss.Mediator.Extensions.DependencyInjection, 2.0.0"
                    
#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 Biss.Mediator.Extensions.DependencyInjection@2.0.0
                    
#: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=Biss.Mediator.Extensions.DependencyInjection&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Biss.Mediator.Extensions.DependencyInjection&version=2.0.0
                    
Install as a Cake Tool

Biss.Mediator.Extensions.DependencyInjection

Extensões para registo do Biss.Mediator no contentor de Dependency Injection.

📦 Instalação

dotnet add package Biss.Mediator.Extensions.DependencyInjection

🚀 Uso Rápido

Registar Mediator

using Biss.Mediator.Extensions.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

// Registar Mediator a escanear o assembly atual
builder.Services.AddMediator(typeof(Program).Assembly);

// Ou vários assemblies
builder.Services.AddMediator(
    typeof(Program).Assembly,
    typeof(MyCommand).Assembly
);

// Ou método de conveniência
builder.Services.AddMediatorFromAssemblyContaining<Program>();

Registar pipeline behaviors definidos no teu código

AddMediatorBehaviors regista implementações de IPipelineBehavior<,> encontradas por reflexão no(s) assembly(s) indicado(s). Os behaviors do pacote Biss.Mediator.Behaviors (Logging, Validation, …) usam as extensões desse pacote (ex.: AddMediatorValidationBehavior()), não dependem só deste scan.

builder.Services.AddMediatorBehaviors(typeof(Program).Assembly);

Métodos principais

  • AddMediator(Assembly[]) — regista IMediator e handlers
  • AddMediatorFromAssembly(Assembly) — um assembly
  • AddMediatorFromAssemblyContaining<T>() — assembly do tipo T
  • AddMediatorBehaviors(Assembly[]) — regista behaviors custom nos assemblies

Dependências

  • Biss.Mediator.Abstractions
  • Biss.Mediator

ASP.NET Core

  • Biss.Mediator.Extensions.AspNetCoreMediatorControllerBase, AddMediatorWithAspNetCore, etc.

Licença

MIT License

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 Biss.Mediator.Extensions.DependencyInjection:

Package Downloads
Biss.Mediator.Extensions.AspNetCore

Mediator e Mapper de alta performance para .NET 10 (source generators e reflection).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 105 4/22/2026
1.2.0 127 4/6/2026
1.1.0 442 12/8/2025
1.0.2 794 12/8/2025 1.0.2 is deprecated because it has critical bugs.
1.0.1 787 12/8/2025 1.0.1 is deprecated because it has critical bugs.
1.0.0 685 12/7/2025 1.0.0 is deprecated because it has critical bugs.