JournaledGrain<TGrainState,TEventBase>.RaiseConditionalEvent<TEvent> Method

Definition

Raise an event conditionally. Succeeds only if there are no conflicts, that is, no other events were raised in the meantime.

protected virtual System.Threading.Tasks.Task<bool> RaiseConditionalEvent<TEvent> (TEvent event) where TEvent : TEventBase;
abstract member RaiseConditionalEvent : 'Event -> System.Threading.Tasks.Task<bool>
override this.RaiseConditionalEvent : 'Event -> System.Threading.Tasks.Task<bool>
Protected Overridable Function RaiseConditionalEvent(Of TEvent As TEventBase) (event As TEvent) As Task(Of Boolean)

Type Parameters

TEvent

Parameters

event
TEvent

Event to raise.

Returns

true if successful, false if there was a conflict.

Applies to