Buzzard 1.0.0

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

🦅 Buzzard

Buzzard is a lightweight, fast, and extensible .NET library that implements the Mediator pattern — similar to MediatR — with full developer control and minimal overhead.

✨ Features

  • Request/Response messaging with IRequest<TResponse>
  • Fire-and-forget notifications with INotification
  • Clean, dependency-injection-first design
  • No runtime reflection or complex setup
  • Designed for performance and testability

📦 Installation

Install via NuGet:

dotnet add package Buzzard

🛠️ Getting Started

1. Configure Services

Register Buzzard in your Startup.cs or Program.cs:

services.AddBuzzard();

2. Create a Request

public class GetUserQuery : IRequest<User>
{
    public int Id { get; set; }
}

3. Implement the Handler

public class GetUserQueryHandler : IRequestHandler<GetUserQuery, User>
{
    public Task<User> HandleAsync(GetUserQuery request, CancellationToken cancellationToken)
    {
        // Fetch from database or service
        return Task.FromResult(new User { Id = request.Id, Name = "Alice" });
    }
}

4. Send a Request

var user = await _buzzardMediator.SendAsync(new GetUserQuery { Id = 1 });

🔔 Notifications

Buzzard supports fire-and-forget notifications that can have multiple handlers.

1. Define a Notification

public class OrderPlaced : INotification
{
    public int OrderId { get; set; }
}

2. Create Handlers

public class EmailHandler : INotificationHandler<OrderPlaced>
{
    public Task HandleAsync(OrderPlaced notification, CancellationToken cancellationToken)
    {
        // Send confirmation email
        return Task.CompletedTask;
    }
}
public class LogHandler : INotificationHandler<OrderPlaced>
{
    public Task HandleAsync(OrderPlaced notification, CancellationToken cancellationToken)
    {
        // Log the order
        return Task.CompletedTask;
    }
}

3. Publish a Notification

await _buzzardMediator.PublishAsync(new OrderPlaced { OrderId = 123 });

Optionally choose the publish strategy:

await _buzzardMediator.PublishAsync(notification, PublishStrategy.Parallel);         // Background threads
await _buzzardMediator.PublishAsync(notification, PublishStrategy.ParallelWhenAll); // Waits for all
await _buzzardMediator.PublishAsync(notification, PublishStrategy.Sequential);      // Default

✅ Unit Testing

Buzzard makes testing easy. You can test handlers directly:

var handler = new GetUserQueryHandler();
var result = await handler.HandleAsync(new GetUserQuery { Id = 1 }, CancellationToken.None);

Or mock IBuzzardMediator for higher-level tests.


🤝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you want to help improve Buzzard.


📄 License

Buzzard is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 156 5/21/2025