Пример #1
0
        private EventActivityBinder <TInstance> GetBinder(
            Func <EventActivityBinder <TInstance>, EventActivityBinder <TInstance> > activityCallback)
        {
            EventActivityBinder <TInstance> binder = new TriggerEventActivityBinder <TInstance>(_machine, _event);

            return(activityCallback(binder));
        }
Пример #2
0
        ActivityBinder <TInstance> CreateConditionalActivityBinder()
        {
            EventActivityBinder <TInstance> binder = new TriggerEventActivityBinder <TInstance>(_machine, _event, _activities);

            var conditionBinder = new ConditionalActivityBinder <TInstance>(_event, context => _filter(context), binder);

            return(conditionBinder);
        }
Пример #3
0
        EventActivityBinder <TInstance> EventActivityBinder <TInstance> .If(StateMachineCondition <TInstance> condition,
                                                                            Func <EventActivityBinder <TInstance>, EventActivityBinder <TInstance> > activityCallback)
        {
            EventActivityBinder <TInstance> binder = new TriggerEventActivityBinder <TInstance>(_machine, _event);

            binder = activityCallback(binder);

            var conditionBinder = new ConditionalActivityBinder <TInstance>(_event, condition, binder);

            return(new TriggerEventActivityBinder <TInstance>(_machine, _event, _filter, _activities, conditionBinder));
        }