protected BotStateMachine(IStateContext <TState> stateContext, IStateContextRepository <TState> stateRepository, Action <StateMachine <TState, string> > configureDelegate) : this(stateContext, stateRepository) { Configure(configureDelegate); }
protected BotStateMachine(IStateContext <TState> stateContext, IStateContextRepository <TState> stateRepository) { if (stateContext == null) { throw new ArgumentNullException(nameof(stateContext)); } StateRepository = stateRepository ?? throw new ArgumentNullException(nameof(stateRepository)); State = stateContext.CurrentState; TelegramId = stateContext.TelegramId; StateMachine = new StateMachine <TState, string>( () => State, s => State = s, FiringMode.Immediate); }
public TestStateMachine(IStateContext <TestState> userContext, IStateContextRepository <TestState> stateRepository) : base(userContext, stateRepository) { }
public TestStateMachine(IStateContext <TestState> userContext, IStateContextRepository <TestState> stateRepository, Action <StateMachine <TestState, string> > configureDelegate) : base( userContext, stateRepository, configureDelegate) { }