Buzzard 1.0.0
dotnet add package Buzzard --version 1.0.0
NuGet\Install-Package Buzzard -Version 1.0.0
<PackageReference Include="Buzzard" Version="1.0.0" />
<PackageVersion Include="Buzzard" Version="1.0.0" />
<PackageReference Include="Buzzard" />
paket add Buzzard --version 1.0.0
#r "nuget: Buzzard, 1.0.0"
#:package Buzzard@1.0.0
#addin nuget:?package=Buzzard&version=1.0.0
#tool nuget:?package=Buzzard&version=1.0.0
🦅 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 | Versions 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. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection (>= 9.0.5)
- Scrutor (>= 6.0.1)
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 |