public virtual Task FireAsync <TArgument>(ParameterizedTrigger <TTrigger, TArgument> parameterizedTrigger, TArgument argument) { return(!IsEnabled ? TaskHelpers.CompletedTask : AwaitableExecutionHelper.FireCoreAsync(parameterizedTrigger, argument, this)); }
public override async Task FireAsync(TTrigger trigger) { if (m_monitor.TryEnter()) { try { await base.FireAsync(trigger).ConfigureAwait(false); } finally { m_monitor.Exit(); } } else { if (IsEnabled) { AwaitableExecutionHelper.ThrowInTransition(); } } }
public override async Task FireAsync <TArgument>(ParameterizedTrigger <TTrigger, TArgument> parameterizedTrigger, TArgument argument) { if (m_monitor.TryEnter()) { try { await base.FireAsync(parameterizedTrigger, argument).ConfigureAwait(false); } finally { m_monitor.Exit(); } } else { if (IsEnabled) { AwaitableExecutionHelper.ThrowInTransition(); } } }
public override async Task MoveToStateAsync(TState state, StateTransitionOption option = StateTransitionOption.Default) { if (m_monitor.TryEnter()) { try { await base.MoveToStateAsync(state, option).ConfigureAwait(false); } finally { m_monitor.Exit(); } } else { if (IsEnabled) { AwaitableExecutionHelper.ThrowInTransition(); } } }
public virtual Task FireAsync(TTrigger trigger) { return(!IsEnabled ? TaskHelpers.CompletedTask : AwaitableExecutionHelper.FireCoreAsync(trigger, this)); }
public virtual Task MoveToStateAsync(TState state, StateTransitionOption option = StateTransitionOption.Default) { return(!IsEnabled ? TaskHelpers.CompletedTask : AwaitableExecutionHelper.MoveToStateCoreAsync(state, option, this)); }