Making.Events
1.0.1-preview
This is a prerelease version of Making.Events.
dotnet add package Making.Events --version 1.0.1-preview
NuGet\Install-Package Making.Events -Version 1.0.1-preview
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="Making.Events" Version="1.0.1-preview" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Making.Events" Version="1.0.1-preview" />
<PackageReference Include="Making.Events" />
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 Making.Events --version 1.0.1-preview
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Making.Events, 1.0.1-preview"
#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 Making.Events@1.0.1-preview
#: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=Making.Events&version=1.0.1-preview&prerelease
#tool nuget:?package=Making.Events&version=1.0.1-preview&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Making.Events
Event abstractions and base implementations for the Making framework.
Overview
Making.Events provides a comprehensive event-driven architecture foundation for the Making framework. It includes abstractions for event handling, publishing, and local event bus implementation for building decoupled, reactive applications.
Features
- Event Abstractions: Core interfaces for events, handlers, and publishers
- Local Event Bus: In-memory event bus implementation
- Event Publishing: Publish events to registered handlers
- Event Subscription: Subscribe to events with typed handlers
- Dependency Injection: Built-in DI container integration
Installation
dotnet add package Making.Events
Usage
Define Events
public class UserCreatedEvent : IEvent
{
public string UserId { get; set; }
public string UserName { get; set; }
public DateTime CreatedAt { get; set; }
}
Create Event Handlers
public class UserCreatedEventHandler : IEventHandler<UserCreatedEvent>
{
public async Task HandleAsync(UserCreatedEvent @event)
{
// Handle the user created event
Console.WriteLine($"User {@event.UserName} was created at {@event.CreatedAt}");
// Perform additional logic like sending emails, updating cache, etc.
}
}
Register Services
services.AddMakingEvents();
services.AddScoped<IEventHandler<UserCreatedEvent>, UserCreatedEventHandler>();
Publish Events
public class UserService
{
private readonly IEventPublisher _eventPublisher;
public UserService(IEventPublisher eventPublisher)
{
_eventPublisher = eventPublisher;
}
public async Task CreateUserAsync(string userName)
{
// Create user logic...
// Publish event
await _eventPublisher.PublishAsync(new UserCreatedEvent
{
UserId = userId,
UserName = userName,
CreatedAt = DateTime.UtcNow
});
}
}
Event Subscription
public class NotificationService
{
private readonly IEventSubscriber _eventSubscriber;
public NotificationService(IEventSubscriber eventSubscriber)
{
_eventSubscriber = eventSubscriber;
}
public async Task SubscribeToEvents()
{
await _eventSubscriber.SubscribeAsync<UserCreatedEvent>(async @event =>
{
// Handle user created notification
await SendWelcomeEmail(@event.UserId, @event.UserName);
});
}
}
Requirements
- .NET Standard 2.0+
- Microsoft.Extensions.DependencyInjection
- Making.Core
License
This project is part of the Making framework.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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 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.
-
net8.0
- Making.Core (>= 1.0.1-preview)
- Microsoft.Extensions.DependencyInjection (>= 8.0.6)
-
net9.0
- Making.Core (>= 1.0.1-preview)
- Microsoft.Extensions.DependencyInjection (>= 9.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Making.Events:
Package | Downloads |
---|---|
Making.Events.RabbitMQ
RabbitMQ event bus implementation for the Making framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.1-preview | 322 | 7/25/2025 |
1.0.0-preview | 394 | 7/25/2025 |