public DynamicTriggerBehaviour(TTrigger trigger, Func <object[], TState> destination, TransitionGuard transitionGuard, Reflection.DynamicTransitionInfo info) : base(trigger, transitionGuard) { _destination = destination ?? throw new ArgumentNullException(nameof(destination)); TransitionInfo = info ?? throw new ArgumentNullException(nameof(info)); }
internal static DynamicTransitionInfo Create <TTrigger>(TTrigger trigger, IEnumerable <InvocationInfo> guards, InvocationInfo selector, DynamicStateInfos possibleStates) { var transition = new DynamicTransitionInfo { Trigger = new TriggerInfo(trigger), GuardConditionsMethodDescriptions = guards ?? new List <InvocationInfo>(), DestinationStateSelectorDescription = selector, PossibleDestinationStates = possibleStates // behaviour.PossibleDestinationStates?.Select(x => x.ToString()).ToArray() }; return(transition); }