Method StartElementStateMonitor
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
StartElementStateMonitor(string, Action<ElementStateChange>, TimeSpan)
Starts monitoring element state changes. Every change triggers the specified onChange
action.
void StartElementStateMonitor(string sourceId, Action<ElementStateChange> onChange, TimeSpan subscribeTimeout)
Parameters
sourceId
stringUnique identifier for the subscription source.
onChange
Action<ElementStateChange>Callback invoked when an element’s state changes.
subscribeTimeout
TimeSpanTimeout for the subscription attempt.
Remarks
These methods are designed for use outside of Protocols. For usage within Protocols, use overloads with SLProtocol
.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
Subscription could not be established in the given time.
StartElementStateMonitor(string, Action<ElementStateChange>)
Starts monitoring element state changes. Every change triggers the specified onChange
action.
void StartElementStateMonitor(string sourceId, Action<ElementStateChange> onChange)
Parameters
sourceId
stringUnique identifier for the subscription source.
onChange
Action<ElementStateChange>Callback invoked when an element’s state changes.
Remarks
These methods are designed for use outside of Protocols. For usage within Protocols, use overloads with SLProtocol
.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
Subscription could not be established in the given time.