Skip to content

PluginEventAudience

Class in Oadm.Sdk.Plugins · Oadm.Sdk.dll

The audience of a plugin event (SDK 0.4.0): the host delivers the event only to the page watchers it covers, so an event about a device never reaches a user who cannot see the device.

public sealed class PluginEventAudience

Guide: Device groups and the call context

static PluginEventAudience AllDevices { get; }

Watchers whose user has all devices (server-wide state: NTP, DHCP, PKI pages).

IReadOnlyList<Guid> DeviceIds { get; }

The device (PluginEventAudienceKind.Device) or the device of each row (PluginEventAudienceKind.DeviceRows).

PluginEventAudienceKind Kind { get; }

Who receives it.

string? ScopeKey { get; }

The device scope key of PluginEventAudienceKind.DeviceScope.

string? SessionId { get; }

The session of PluginEventAudienceKind.Session.

string? UserName { get; }

The user of PluginEventAudienceKind.User.

static PluginEventAudience Device(Guid deviceId)

Watchers whose user can see deviceId.

static PluginEventAudience DeviceRows(IReadOnlyList<Guid> rowDeviceIds)

The payload is a JSON array with one element per entry of rowDeviceIds (same order); each watcher gets the elements of the devices it can see.

static PluginEventAudience DeviceScope(string scopeKey)

The watchers whose ICallContext.DeviceScopeKey is scopeKey: state kept per group (ICallContext.AllDevicesScopeKey = the watchers with all devices).

static PluginEventAudience Of(ICallContext caller)

The session of caller: events of work the user started.

static PluginEventAudience Session(string sessionId)

The watchers of one session (ICallContext.SessionId).

static PluginEventAudience User(string userName)

Every watcher of userName.