SubscribeEvents¶
-
ISubscription IEventSource.SubscribeEvents(System.Collections.IEnumerable<IEvent> events, EventOccurredHandler handler)¶
Subscribes a callback to be executed when any of the selected events occur.
- Parameters
events – Events of this event source that should trigger the callback.
handler – Delegate to be invoked when any of the selected events occur.
- Returns
ISubscription – An ISubscription for the callback.
- Throws
NullArgumentException– Null reference was passed.InvalidArgumentException– Empty collection of events specified.InvalidArgumentException– One or more of the selected events are not part of this event source.OutOfResourcesException– No resources available to subscribe callback.CommunicationErrorException– Protocol error.ConnectionLostException– Connection to controller lost.RebootedException– Controller has been rebooted since this object reference was retrieved, invalidating this reference.IncompatibleException– Incompatible firmware version loaded (only applicable if entity is a controller).System.ObjectDisposedException– Object is disposed (only applicable if entity is disposable).