Biss.Mediator.Abstractions 2.0.0

dotnet add package Biss.Mediator.Abstractions --version 2.0.0
                    
NuGet\Install-Package Biss.Mediator.Abstractions -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.Abstractions" 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.Abstractions" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Biss.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 Biss.Mediator.Abstractions --version 2.0.0
                    
#r "nuget: Biss.Mediator.Abstractions, 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.Abstractions@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.Abstractions&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Biss.Mediator.Abstractions&version=2.0.0
                    
Install as a Cake Tool

Biss.Mediator.Abstractions

Interfaces e contratos base para o padrão Mediator em .NET 10.

📦 Instalação

dotnet add package Biss.Mediator.Abstractions

🎯 O que é este pacote?

Este é o pacote base do Biss.Mediator. Ele contém apenas as interfaces e tipos fundamentais:

  • IMediator - Interface principal do mediator
  • IRequest<TResponse> - Interface para requests com retorno
  • ICommand / ICommand<TResponse> - Interfaces para commands
  • IQuery<TResponse> - Interface para queries
  • INotification - Interface para notificações
  • IRequestHandler<TRequest, TResponse> - Interface para handlers
  • IPipelineBehavior<TRequest, TResponse> - Interface para pipeline behaviors
  • Result<T> - Tipo para resultados com sucesso/erro
  • Error - Sistema de erros tipado

🚀 Uso Básico

using Biss.Mediator.Abstractions;

// Definir um command
public record CreateUserCommand(string Name, string Email) : ICommand<UserId>;

// Definir um query
public record GetUserQuery(Guid Id) : IQuery<UserDto>;

// Definir um handler
public class CreateUserHandler : ICommandHandler<CreateUserCommand, UserId>
{
    public async Task<Result<UserId>> Handle(
        CreateUserCommand request, 
        CancellationToken cancellationToken)
    {
        // Implementação do handler
        return Result<UserId>.Success(new UserId(Guid.NewGuid()));
    }
}

📚 Próximos Passos

Para usar o Mediator, é necessário:

  1. Biss.Mediator — implementação do mediator
  2. Biss.Mediator.Extensions.DependencyInjection — registo no contentor DI
  3. Biss.Mediator.Extensions.AspNetCore — ASP.NET Core (opcional)

📄 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.
  • net10.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Biss.Mediator.Abstractions:

Package Downloads
Biss.Mediator.Extensions.DependencyInjection

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

Biss.Mediator

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

Biss.Mediator.Behaviors

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

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 129 4/22/2026
1.2.0 164 4/6/2026
1.1.0 463 12/9/2025
1.0.0 419 12/7/2025