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
sourceIdstringA unique string that identifies the subscription source (e.g., a GUID).
onChangeAction<ElementNameChange>Callback to be executed when an element name changes.
subscribeTimeoutTimeSpanTimeout 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
sourceIdoronChangeis 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
sourceIdstringThe unique string identifying the subscription source.
onChangeAction<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
sourceIdoronChangeis null.- InvalidOperationException
Subscription failed to start in the default timeout period.