IDeviceScopes
Interface in Oadm.Sdk.Plugins · Oadm.Sdk.dll
The device groups as a plugin sees them (ICorePluginContext.DeviceScopes, SDK 0.4.0), for objects a plugin keeps for a group (dashboards, device triggers, saved views: stored with ICallContext.DeviceScopeKey of the user who made them). Background work of such an object uses only the devices of its owner, and a deleted group’s objects are off (fail closed) until an administrator gives them another owner.
public interface IDeviceScopesGuide: Device groups and the call context
Methods
Section titled “Methods”Contains
Section titled “Contains”bool Contains(string scopeKey, IDeviceInfo device)True when device is in the devices of scopeKey (false for a deleted group).
Contains
Section titled “Contains”bool Contains(string scopeKey, Guid deviceId)Default implementation
True when the device with deviceId is managed and in the devices of scopeKey now (a few hash lookups, no request; SDK 0.4.0): for state kept per scope whose rows hold only the device id, e.g. the counts a sweep publishes. Fail closed: the default and a host that cannot tell answer false.
Devices
Section titled “Devices”IDeviceRepository Devices(string scopeKey)The devices of scopeKey (none for a deleted group).
Exists
Section titled “Exists”bool Exists(string scopeKey)True for ICallContext.AllDevicesScopeKey and for the key of a group that exists; false for a deleted group.
InAnyGroup
Section titled “InAnyGroup”bool InAnyGroup(IDeviceInfo device)Default implementation
True when any device group covers device (a user limited to a group can reach it). Fail closed: the default and a host that cannot tell answer true.
NameOf
Section titled “NameOf”string? NameOf(string scopeKey)The display name of a scope (“All devices” or the group’s name); null for a deleted group.
Events
Section titled “Events”Changed
Section titled “Changed”event EventHandler<string>? ChangedRaised (without a caller) with the key of a group whose rules changed or that was deleted.