internal StateInner(string name, ITransitionDelegate <TState> transitionDelegate) { this.Name = name; this.transitionDelegate = transitionDelegate; this.Transitions = new ReadOnlyCollection <ITransition <TState> >(this.transitions); this.Groups = new ReadOnlyCollection <IStateGroup <TState> >(this.groups); }
public ForcedTransitionInvoker(TState toState, IEvent @event, ITransitionDelegate <TState> transitionDelegate) { this.toState = toState; this.EventFireMethod = EventFireMethod.Fire; this.Event = @event; this.transitionDelegate = transitionDelegate; }
internal DynamicTransition(TState from, Event @event, Func <DynamicSelectorInfo <TState>, TState> stateSelector, ITransitionDelegate <TState> transitionDelegate) { this.From = from; this.Event = @event; this._stateSelector = stateSelector; this.transitionDelegate = transitionDelegate; }
public ForcedTransitionInvoker(TState toState, IEvent @event, object eventData, ITransitionDelegate <TState> transitionDelegate) { this.toState = toState; // This is never actually references, but needs to be part of ITransitionInvoker this.EventFireMethod = EventFireMethod.Fire; this.Event = @event; this.EventData = eventData; this.transitionDelegate = transitionDelegate; }
private Transition(TState from, TState to, Event @event, ITransitionDelegate <TState> transitionDelegate, bool isInnerTransition) { if (from.ParentStateMachine != to.ParentStateMachine) { throw new InvalidStateTransitionException(from, to); } this.transitionDelegate = transitionDelegate; this.From = from; this.To = to; this.Event = @event; this.IsInnerTransition = isInnerTransition; }
public TransitionInner(TState from, TState to, TEvent @event, ITransitionDelegate <TState> transitionDelegate, bool isInnerTransition) { if (from.ParentStateMachine != to.ParentStateMachine) { throw new InvalidStateTransitionException(from, to); } if (from.ParentStateMachine != @event.ParentStateMachine && !from.ParentStateMachine.IsChildOf(@event.ParentStateMachine)) { throw new InvalidEventTransitionException(from, @event); } this.From = from; this.To = to; this.Event = @event; this.transitionDelegate = transitionDelegate; this.IsInnerTransition = isInnerTransition; }
internal static Transition <TState> CreateInner <TState>(TState fromAndTo, Event @event, ITransitionDelegate <TState> transitionDelegate) where TState : class, IState <TState> { return(new Transition <TState>(new TransitionInner <TState, Event, TransitionInfo <TState> >(fromAndTo, fromAndTo, @event, transitionDelegate, isInnerTransition: true))); }
internal static Transition <TState, TEventData> Create <TState, TEventData>(TState from, TState to, Event <TEventData> @event, ITransitionDelegate <TState> transitionDelegate) where TState : class, IState <TState> { return(new Transition <TState, TEventData>(new TransitionInner <TState, Event <TEventData>, TransitionInfo <TState, TEventData> >(from, to, @event, transitionDelegate, isInnerTransition: false))); }
public TransitionBuilder(TState fromState, Event @event, ITransitionDelegate <TState> transitionDelegate) { this.fromState = fromState; this.@event = @event; this.transitionDelegate = transitionDelegate; }
public IgnoredTransition(TState fromState, IEvent @event, ITransitionDelegate <TState> transitionDelegate) { this.transitionDelegate = transitionDelegate; this.fromState = fromState; this.@event = @event; }
public EventTransitionInvoker(Event @event, EventFireMethod eventFireMethod, ITransitionDelegate <TState> transitionDelegate) { this.@event = @event; this.EventFireMethod = eventFireMethod; this.transitionDelegate = transitionDelegate; }
internal Transition(TState fromAndTo, Event @event, ITransitionDelegate <TState> transitionDelegate) : this(fromAndTo, fromAndTo, @event, transitionDelegate, isInnerTransition : true) { }
internal Transition(TState from, TState to, Event @event, ITransitionDelegate <TState> transitionDelegate) : this(from, to, @event, transitionDelegate, isInnerTransition : false) { }