Method StartNameMonitor
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
StartNameMonitor(string, Action<ElementNameChange>, TimeSpan)
Starts monitoring name changes for a specific element. Every change triggers the specified onChange
action.
void StartNameMonitor(string sourceId, Action<ElementNameChange> onChange, TimeSpan subscribeTimeout)
Parameters
sourceId
stringA unique string that identifies the subscription source (e.g., a GUID).
onChange
Action<ElementNameChange>Callback to be executed when an element name changes.
subscribeTimeout
TimeSpanTimeout duration to establish the subscription.
Remarks
This method is intended for use outside Protocols.
Inside a Protocol, prefer using the SLProtocol
version to ensure subscription lifecycle management.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
The monitor could not be started in the given time.
StartNameMonitor(string, Action<ElementNameChange>)
Starts monitoring name changes for a specific element using the default timeout.
void StartNameMonitor(string sourceId, Action<ElementNameChange> onChange)
Parameters
sourceId
stringThe unique string identifying the subscription source.
onChange
Action<ElementNameChange>Callback triggered when the element’s name changes.
Remarks
For non-Protocol contexts. Protocols require the SLProtocol
variant for proper cleanup handling.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
Subscription failed to start in the default timeout period.