Skip to main content

NotificationSpec

Namespace: BlazorNative.Core

A local notification to schedule or show. Crosses the ABI as the existing flat JSON object of string→string (numbers string-encoded, reusing the fetch-headers serializer — no new serializer). NotificationSpec.Id is the app-chosen 32-bit key that cancel targets (collisions replace, Android notify semantics); NotificationSpec.When null means show immediately, else it is the fire time (crossing as Unix epoch milliseconds); NotificationSpec.Route is the tap-through target (a DEEP_LINK_COMPONENTS key) or null.

public readonly record struct NotificationSpec

Inheritance ObjectValueTypeNotificationSpec
Implements IEquatable<NotificationSpec>
Attributes NullableContextAttribute, NullableAttribute, IsReadOnlyAttribute

Properties

Id

The app-chosen 32-bit key that cancel targets (collisions replace).

public int Id { get; init; }

Property Value

Int32

Title

The notification title.

public string Title { get; init; }

Property Value

String

Body

The notification body.

public string Body { get; init; }

Property Value

String

When

The fire time, or null to show immediately.

public DateTimeOffset? When { get; init; }

Property Value

DateTimeOffset?

Route

The tap-through route, or null.

public string? Route { get; init; }

Property Value

String

Constructors

NotificationSpec(Int32, String, String, DateTimeOffset?, String)

A local notification to schedule or show. Crosses the ABI as the existing flat JSON object of string→string (numbers string-encoded, reusing the fetch-headers serializer — no new serializer). NotificationSpec.Id is the app-chosen 32-bit key that cancel targets (collisions replace, Android notify semantics); NotificationSpec.When null means show immediately, else it is the fire time (crossing as Unix epoch milliseconds); NotificationSpec.Route is the tap-through target (a DEEP_LINK_COMPONENTS key) or null.

public NotificationSpec(int Id, string Title, string Body, DateTimeOffset? When, string? Route)

Parameters

Id Int32
The app-chosen 32-bit key that cancel targets (collisions replace).

Title String
The notification title.

Body String
The notification body.

When DateTimeOffset?
The fire time, or null to show immediately.

Route String?
The tap-through route, or null.