Biss.Mediator.Abstractions 1.1.0

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

Biss.Mediator.Abstractions

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

📦 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)
    {
        // Sua lógica aqui
        return Result<UserId>.Success(new UserId(Guid.NewGuid()));
    }
}

📚 Próximos Passos

Para usar o Mediator, você também precisa:

  1. Biss.Mediator - Implementação do mediator
  2. Biss.Mediator.Extensions.DependencyInjection - Para registro no DI container
  3. Biss.Mediator.Extensions.AspNetCore - Para uso em ASP.NET Core (opcional)

📄 Licença

MIT License

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 (4)

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

Package Downloads
Biss.Mediator.Extensions.DependencyInjection

High-performance Mediator and Mapper components for .NET 9

Biss.Mediator

High-performance Mediator and Mapper components for .NET 9

Biss.Mediator.Extensions.AspNetCore

High-performance Mediator and Mapper components for .NET 9

Biss.Mediator.Behaviors

High-performance Mediator and Mapper components for .NET 9

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 429 12/9/2025
1.0.0 394 12/7/2025