Table of Contents

Delegate TimerAsyncHandler<TDigitalTwin>

Namespace
Scaleout.Modules.DigitalTwin.Abstractions
Assembly
Scaleout.Modules.DigitalTwin.Abstractions.dll

Digital twin timer delegate. Must be assigned to either a public static method or a class instance method.

public delegate Task<ProcessingResult> TimerAsyncHandler<TDigitalTwin>(string timerName, TDigitalTwin instance, ProcessingContext<TDigitalTwin> context) where TDigitalTwin : DigitalTwinBase<TDigitalTwin>

Parameters

timerName string

The timer name.

instance TDigitalTwin

The target digital twin object.

context ProcessingContext<TDigitalTwin>

The digital twin message processing context.

Returns

Task<ProcessingResult>

Return DoUpdate to indicate that the digital twin object data was modified so the digital twin needs to be saved. Return NoUpdate if the twin object was not modified and does not need to be saved.

Type Parameters

TDigitalTwin

Remarks

Each digital twin instance can have up to 5 timers that can be started via the StartTimerAsync(string, TimeSpan, TimerType, TimerAsyncHandler<TDigitalTwin>) method call.