Class InitContext<TDigitalTwin>
- Namespace
- Scaleout.Modules.DigitalTwin.Abstractions
- Assembly
- Scaleout.Modules.DigitalTwin.Abstractions.dll
Context object that provides operations that are available when a digital twin instance is being created.
public abstract class InitContext<TDigitalTwin> where TDigitalTwin : DigitalTwinBase<TDigitalTwin>
Type Parameters
TDigitalTwin
- Inheritance
-
InitContext<TDigitalTwin>
- Inherited Members
Properties
SharedGlobalData
Gets an ISharedData instance for accessing objects that are shared globally between all models.
public abstract ISharedData SharedGlobalData { get; }
Property Value
SharedModelData
Gets an ISharedData instance for accessing shared objects that are associated with the model being processed.
public abstract ISharedData SharedModelData { get; }
Property Value
Methods
StartTimerAsync(string, TimeSpan, TimerType, TimerAsyncHandler<TDigitalTwin>)
Starts a new timer for the digital twin being created.
public abstract Task<TimerActionResult> StartTimerAsync(string timerName, TimeSpan interval, TimerType type, TimerAsyncHandler<TDigitalTwin> timerCallback)
Parameters
timerNamestringThe timer name.
intervalTimeSpanThe timer interval.
typeTimerTypeThe type of the timer.
timerCallbackTimerAsyncHandler<TDigitalTwin>A delegate representing a user-defined timer callback static method to be executed.
Returns
- Task<TimerActionResult>
Success if the timer was started successfully, otherwise one of the following error codes is returned: FailedTooManyTimers when the maximum number of timers is reached or FailedInternalError if an error occurred during the method call.