Table of Contents

Class NearbyDeviceChange

Namespace
Plugin.Maui.NearbyConnectivity
Assembly
Plugin.Maui.NearbyConnectivity.dll

A single change to the device set, raised by DeviceChanged.

public sealed record NearbyDeviceChange : IEquatable<NearbyDeviceChange>
Inheritance
NearbyDeviceChange
Implements
Inherited Members

Remarks

A delta, not a whole-list snapshot. A caller applies the one change described here instead of re-diffing the entire collection on every transition.

Constructors

NearbyDeviceChange(NearbyDeviceChangeAction, NearbyDevice)

A single change to the device set, raised by DeviceChanged.

public NearbyDeviceChange(NearbyDeviceChangeAction Action, NearbyDevice Device)

Parameters

Action NearbyDeviceChangeAction

The kind of change this is.

Device NearbyDevice

The device as it is after the change. This instance never updates itself: a later change to the same device arrives as a new NearbyDeviceChange carrying a new snapshot.

Remarks

A delta, not a whole-list snapshot. A caller applies the one change described here instead of re-diffing the entire collection on every transition.

Properties

Action

The kind of change this is.

public NearbyDeviceChangeAction Action { get; init; }

Property Value

NearbyDeviceChangeAction

Device

The device as it is after the change. This instance never updates itself: a later change to the same device arrives as a new NearbyDeviceChange carrying a new snapshot.

public NearbyDevice Device { get; init; }

Property Value

NearbyDevice

Reason

Gets why the device left the set or its connection ended, when the plugin observed a reason locally.

public NearbyEndReason? Reason { get; init; }

Property Value

NearbyEndReason?

The locally-observed reason, or null for a change with no ending in it: a device found, a request received, a handshake that succeeded.