コード例 #1
0
 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));
 }
コード例 #2
0
        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);
        }