ISL.NetFramework.Notification.Driver 2.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package ISL.NetFramework.Notification.Driver --version 2.5.2
                    
NuGet\Install-Package ISL.NetFramework.Notification.Driver -Version 2.5.2
                    
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="ISL.NetFramework.Notification.Driver" Version="2.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ISL.NetFramework.Notification.Driver" Version="2.5.2" />
                    
Directory.Packages.props
<PackageReference Include="ISL.NetFramework.Notification.Driver" />
                    
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 ISL.NetFramework.Notification.Driver --version 2.5.2
                    
#r "nuget: ISL.NetFramework.Notification.Driver, 2.5.2"
                    
#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 ISL.NetFramework.Notification.Driver@2.5.2
                    
#: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=ISL.NetFramework.Notification.Driver&version=2.5.2
                    
Install as a Cake Addin
#tool nuget:?package=ISL.NetFramework.Notification.Driver&version=2.5.2
                    
Install as a Cake Tool

ISL.NetFramework.Notification.Driver

Single-package notification driver for ISL services. It delivers notifications over two channels from one call:

  • Web — SignalR (WebSocket), with an optional Redis backplane for horizontally scaled deployments.
  • Mobile / iOS — Firebase Cloud Messaging (FCM), which fans a single token list out to both Android and Apple (APNs) devices.

Notification history is persisted to SQL through the framework repositories, and the same capabilities are exposed both as an injectable driver (for internal services such as content or booking) and as HTTP endpoints.

Registration

builder.Services.AddIslNotificationDriver(builder.Configuration);

// Map the SignalR hub and, optionally, the REST endpoints.
app.MapHub<NotificationHub>("/hubs/notifications");
app.MapIslNotificationEndpoints();

Configuration

{
  "Framework": {
    "Notification": {
      "Driver": {
        "Enabled": true,
        "Firebase": {
          "ServiceAccountKeyPath": "secrets/serviceAccountKey.json"
        },
        "Redis": {
          "Enabled": true,
          "ConnectionString": "",
          "ChannelPrefix": "ISL.Notification"
        },
        "Endpoint": {
          "Enabled": true,
          "RoutePrefix": "/api/notifications"
        },
        "Auth": {
          "RequireAuthentication": true
        },
        "Delivery": {
          "TrackDeliveryStatus": false
        }
      }
    }
  }
}
  • When Firebase.ServiceAccountKeyPath is empty, mobile push is disabled and only web delivery runs.
  • When Redis.Enabled is true and Redis.ConnectionString is empty, the connection string falls back to Framework:Redis:ConnectionString.
  • Delivery.TrackDeliveryStatus (default false): receiver rows keep their initial Queued status. Set to true to write the post-publish outcome (Sent for web, Sent/InvalidToken for push) and a DeliveredAt timestamp — one extra UPDATE per send.

Injecting the driver

public sealed class BookingConfirmationNotifier(INotificationDriver notifications)
{
    public Task NotifyAsync(long userId, CancellationToken ct) =>
        notifications.SendAsync(
            new NotificationDriverSendRequest(
                Title: "Booking confirmed",
                Body: "Your appointment is booked.",
                Channel: NotificationChannel.All,
                Recipients: [new NotificationRecipient(UserId: userId)],
                Data: new Dictionary<string, string> { ["bookingId"] = "1234" }),
            ct);
}

Endpoints

All read and mutate endpoints act on the authenticated caller's own notifications; the owning user is resolved from the principal.

Method Route Purpose
POST / Send a notification to one or more recipients.
POST /tokens Register or refresh the caller's device token.
DELETE /tokens/{deviceId} Unregister a device.
GET / List the caller's notifications.
GET /unseen-count Return the caller's unseen count.
POST /{notificationId}/seen Mark a notification as seen.
DELETE /{notificationId} Delete a notification.

Database

The driver persists to three tables. Notifications holds immutable content, and NotificationReceivers holds one row per recipient with that user's own seen/checked flags and web/push delivery outcome, so a single notification can fan out to many users while each tracks an independent history. FcmTokens stores device tokens for mobile push. Idempotent creation SQL ships in sql/notification-schema.sql.

DELETE /{notificationId} is a per-user dismiss: it removes only the caller's NotificationReceivers row, leaving the shared content and other recipients untouched.

erDiagram
    NOTIFICATIONS ||--o{ NOTIFICATION_RECEIVERS : "fans out to"

    NOTIFICATIONS {
        uniqueidentifier Id PK
        nvarchar         Message
        nvarchar         MessageJsonValue "arbitrary JSON payload"
        nvarchar         Topic
        nvarchar         GeneratorIdentifier "nullable"
        int              GeneratorModule
        int              MessageType
        int              NotificationType
        int              NotifierMethod  "1=Direct 2=Topic"
        datetimeoffset   CreatedAt
    }

    NOTIFICATION_RECEIVERS {
        uniqueidentifier Id PK
        uniqueidentifier NotificationId FK
        bigint           ReceiverId         "indexed"
        int              Seen               "1=Unseen 2=Seen"
        datetimeoffset   SeenAt             "nullable"
        int              Checked            "1=Unchecked 2=Checked"
        datetimeoffset   CheckedAt          "nullable"
        int              NotifierType       "which channel targeted"
        int              WebDeliveryStatus  "1=N/A 2=Queued 3=Sent 4=Failed 5=InvalidToken"
        int              PushDeliveryStatus "1=N/A 2=Queued 3=Sent 4=Failed 5=InvalidToken"
        datetimeoffset   DeliveredAt        "nullable"
        bit              IsDeleted          "per-user dismiss"
    }

    FCM_TOKENS {
        uniqueidentifier Id PK
        nvarchar         DeviceId "unique"
        nvarchar         Email    "indexed"
        bigint           UserId   "indexed"
        nvarchar         Token
    }
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

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
2.5.3 0 9/4/2026
2.5.2 80 9/3/2026
2.5.1 37 9/3/2026