Düzenle

Aracılığıyla paylaş


ITimerRegistry.RegisterGrainTimer<TState> Method

Definition

Creates a grain timer.

public Orleans.Runtime.IGrainTimer RegisterGrainTimer<TState> (Orleans.Runtime.IGrainContext grainContext, Func<TState,System.Threading.CancellationToken,System.Threading.Tasks.Task> callback, TState state, Orleans.Runtime.GrainTimerCreationOptions options);
abstract member RegisterGrainTimer : Orleans.Runtime.IGrainContext * Func<'State, System.Threading.CancellationToken, System.Threading.Tasks.Task> * 'State * Orleans.Runtime.GrainTimerCreationOptions -> Orleans.Runtime.IGrainTimer
Public Function RegisterGrainTimer(Of TState) (grainContext As IGrainContext, callback As Func(Of TState, CancellationToken, Task), state As TState, options As GrainTimerCreationOptions) As IGrainTimer

Type Parameters

TState

The type of the state parameter.

Parameters

grainContext
IGrainContext

The grain which the timer is associated with.

callback
Func<TState,CancellationToken,Task>

The timer callback, which will be invoked whenever the timer becomes due.

state
TState

The state passed to the callback.

options
GrainTimerCreationOptions

The options for creating the timer.

Returns

The IGrainTimer instance which represents the timer.

Applies to