PublishedEvent
Record in Oadm.Sdk.Events · Oadm.Sdk.dll
An event as it was published to the server: by a plugin through IEventPublisher or by OADM itself (Device unreachable, Certificate expires soon). Received through IEventSubscriptions.
public sealed record PublishedEvent(string TypeId, Guid? DeviceId, PublishedEventKind Kind, IReadOnlyDictionary<string, string> Data, DateTimeOffset Time, bool FromSnapshot = false)Parameters
TypeId: The event type (EventTypeInfo.Id).DeviceId: The device, or null for an event of the server.Kind: On, off or fired.Data: The event’s values as received (“temperature” = “41.5”); empty when it has none.Time: When the server received it (forPublishedEvent.FromSnapshotevents: when the subscription started).FromSnapshot: Part of the snapshot of the events that were on when the subscription started.
Properties
Section titled “Properties”IReadOnlyDictionary<string, string> Data { get; init; }The event’s values as received (“temperature” = “41.5”); empty when it has none.
DeviceId
Section titled “DeviceId”Guid? DeviceId { get; init; }The device, or null for an event of the server.
FromSnapshot
Section titled “FromSnapshot”bool FromSnapshot { get; init; }Part of the snapshot of the events that were on when the subscription started.
PublishedEventKind Kind { get; init; }On, off or fired.
DateTimeOffset Time { get; init; }When the server received it (for PublishedEvent.FromSnapshot events: when the subscription started).
TypeId
Section titled “TypeId”string TypeId { get; init; }The event type (EventTypeInfo.Id).