public void FiredEvent(IStateMachineInformation <NodeState, GossipEvent> stateMachine, ITransitionContext <NodeState, GossipEvent> context)
        {
            EnsureArg.IsNotNull(stateMachine, "stateMachine");
            EnsureArg.IsNotNull(context, "context");

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("State machine {0} performed {1}.", stateMachine.Name, context.GetRecords());
            Console.ResetColor();
        }
Beispiel #2
0
        /// <summary>
        /// Called when an event was fired on the state machine.
        /// </summary>
        /// <param name="stateMachine">The state machine.</param>
        /// <param name="context">The transition context.</param>
        public override void FiredEvent(IStateMachineInformation <TState, TEvent> stateMachine, ITransitionContext <TState, TEvent> context)
        {
            Ensure.ArgumentNotNull(stateMachine, "stateMachine");
            Ensure.ArgumentNotNull(context, "context");

            if (this.log.IsDebugEnabled)
            {
                this.log.DebugFormat("State machine {0} performed {1}.", stateMachine.Name, context.GetRecords());
            }
        }
Beispiel #3
0
        public override void EnteredInitialState(IStateMachineInformation <TState, TEvent> stateMachine, TState state, ITransitionContext <TState, TEvent> context)
        {
            Ensure.ArgumentNotNull(context, "context");

            this.log.DebugFormat("State machine {0} performed {1}.", stateMachine, context.GetRecords());
        }