public TState EnterInitialState( IStateLogic <TState, TEvent> stateLogic, ILastActiveStateModifier <TState, TEvent> lastActiveStateModifier) { var stack = this.TraverseUpTheStateHierarchy(); this.TraverseDownTheStateHierarchyAndEnterStates(stateLogic, stack); return(stateLogic.EnterByHistory(this.initialState, this.context, lastActiveStateModifier)); }
public async Task <TState> EnterInitialState( IStateLogic <TState, TEvent> stateLogic, ILastActiveStateModifier <TState, TEvent> lastActiveStateModifier) { var stack = this.TraverseUpTheStateHierarchy(); await this.TraverseDownTheStateHierarchyAndEnterStates(stateLogic, stack) .ConfigureAwait(false); return(await stateLogic.EnterByHistory(this.initialState, this.context, lastActiveStateModifier) .ConfigureAwait(false)); }