Skip to main content

NativeEvent

Namespace: BlazorNative.Core

An unsolicited event raised by the native host into .NET (IMobileBridge.NativeEvents) — a lifecycle callback, a notification tap-through, and the like.

public readonly record struct NativeEvent

Inheritance Object → ValueType → NativeEvent
Implements IEquatable<NativeEvent>
Attributes NullableContextAttribute, NullableAttribute, IsReadOnlyAttribute

Properties​

Name​

The event name (e.g. a lifecycle phase or the reserved navigate name).

public string Name { get; init; }

Property Value​

String

Payload​

An optional payload string, or null.

public string? Payload { get; init; }

Property Value​

String

Constructors​

NativeEvent(String, String)​

An unsolicited event raised by the native host into .NET (IMobileBridge.NativeEvents) — a lifecycle callback, a notification tap-through, and the like.

public NativeEvent(string Name, string? Payload = null)

Parameters​

Name String
The event name (e.g. a lifecycle phase or the reserved navigate name).

Payload String?
An optional payload string, or null.