Naravel.Notifications 0.2.0

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

Naravel.Notifications

NuGet Downloads .NET 10 License: MIT

Typed notification fan-out over explicitly named channels, with a fake for tests. Channels (Mail, Queue) are separate opt-in packages.

Fact Detail
Install dotnet add package Naravel.Notifications
Targets .NET 10
Needs No other Naravel package
Channels mail and queued delivery are separate opt-in packages: Naravel.Notifications.Mail and Naravel.Notifications.Queue

What you get

  • One typed notification, the channels you name. SendAsync(recipient, notification, ["log"], ct) delivers through the named channels, in the order you name them.
  • A channel is a class or a delegate. A class implements INotificationChannel<T> and is resolved from DI per scope, so it can take dependencies.
  • A built-in log channel. AddLogNotificationChannel<T>() logs the type names only.
  • Plain recipients. The recipient is any object; it is passed to the channels as is.
  • A test fake. NotificationFake is an INotificationSender that delivers nothing, for assertions in tests.

Quick start

using Naravel.Notifications;

builder.Services.AddNaravelNotifications();
builder.Services.AddLogNotificationChannel<InvoiceReady>();   // a channel named "log"

app.MapPost("/invoices/{id:int}/notify", async (int id, INotificationSender notifications, CancellationToken ct) =>
{
    var recipient = new User("Ada");   // any object: it is passed to the channels as is
    await notifications.SendAsync(recipient, new InvoiceReady(id), ["log"], ct);
    return Results.Accepted();
});

public sealed record User(string Name);
public sealed record InvoiceReady(int InvoiceId);

A channel is registered per notification type and chosen by name on every call; nothing is inferred from the recipient or from registration order.

Package Adds
Naravel.Notifications.Mail Optional Naravel.Notifications adapter: a "mail" channel that delivers a notification through Naravel.Mail.
Naravel.Notifications.Queue Optional Naravel.Notifications adapter that delivers notifications through Naravel.Queue: only a registered alias and a plain payload are stored.

Learn more

Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.

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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Naravel.Notifications:

Package Downloads
Naravel.Notifications.Queue

Optional Naravel.Notifications adapter that delivers notifications through Naravel.Queue: only a registered alias and a plain payload are stored.

Naravel.Notifications.Mail

Optional Naravel.Notifications adapter: a "mail" channel that delivers a notification through Naravel.Mail.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 114 11/13/2026
0.1.1 129 11/2/2026
0.1.0 133 11/1/2026