/// <summary>
        /// Initializes a new instance of the <see cref="PassiveStateMachine{TState, TEvent}"/> class.
        /// </summary>
        /// <param name="name">The name of the state machine. Used in log messages.</param>
        /// <param name="factory">The factory used to build up internals. Pass your own factory to change the behavior of the state machine.</param>
        public PassiveStateMachine(string name, IFactory <TState, TEvent> factory)
        {
            var passiveExecuter = new PassiveExecuter();

            name = StateMachine <TState, TEvent> .NameOrDefault(this.GetType(), name);

            stateMachine = new StateMachine <TState, TEvent>(name ?? this.GetType().FullName, factory, passiveExecuter);
        }
Esempio n. 2
0
        public TestStateMachine(string name)
        {
            var passiveExecuter = new PassiveExecuter();

            stateMachine = new StateMachine <TState, TEvent>(name ?? this.GetType().FullName, null, passiveExecuter);
        }