Пример #1
0
        public GrpcStateEngine(
            IStateMachineService stateMachineService,
            IEnumerable <IEventListener> listeners)
        {
            _stateMachineService = stateMachineService
                                   .WithHeaders(new Metadata
            {
                { "Status-Type", typeof(TState).AssemblyQualifiedName },
                { "Input-Type", typeof(TInput).AssemblyQualifiedName }
            });

            _listeners = listeners.ToList();
        }
Пример #2
0
        public GrpcStateEngine(
            IStateMachineService stateMachineService,
            IEnumerable <IEventListener> listeners)
        {
            _stateMachineService = stateMachineService
                                   .WithHeaders(new Metadata
            {
                { "Status-Type", TypeState.FromType(typeof(TState)).GetFullName() },
                { "Input-Type", TypeState.FromType(typeof(TInput)).GetFullName() }
            });

            _listeners = listeners.ToList();
        }
Пример #3
0
 public StateMachine(IBotFlowService botFlowService,
                     IUserSemaphoreService userSemaphoreService,
                     IVariableService variableService,
                     ICustomActionService customActionService,
                     IStateMachineService stateMachineService,
                     INlpProvider nlpProvider)
 {
     _botFlowService       = botFlowService;
     _userSemaphoreService = userSemaphoreService;
     _variableService      = variableService;
     _stateMachineService  = stateMachineService;
     _customActionService  = customActionService;
     _nlpProvider          = nlpProvider;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkflowService"/> class.
        /// </summary>
        /// <param name="stateMachineService">The machine repository.</param>
        /// <param name="workflowPersister">The workflow persister.</param>
        /// <param name="domainContextRepository">The domain context repository.</param>
        public WorkflowService(
            IStateMachineService stateMachineService,
            IWorkflowPersister workflowPersister,
            IDomainContextRepository domainContextRepository)
        {
            if (stateMachineService == null)
            {
                throw new ArgumentNullException("stateMachineService");
            }
            if (workflowPersister == null)
            {
                throw new ArgumentNullException("workflowPersister");
            }

            _stateMachineService     = stateMachineService;
            _workflowPersister       = workflowPersister;
            _domainContextRepository = domainContextRepository;

            _stateField = GetStateMachineContextFieldInfo(CurrentStateFieldName);
        }
Пример #5
0
 public TestStateMachineService()
 {
     _service = new StateMachineService(new DummyRepository <StateMachineEntity, Guid>(_storage));
 }
Пример #6
0
        public GrpcStateMachine(IStateMachineService stateMachineService, string machineId)
        {
            _stateMachineService = stateMachineService;

            MachineId = machineId;
        }
 public StateMachineController(IStateMachineService stateMachineService, ILoggerService loggerService, IStateMachineRepository stateMachineRepository)
 {
     _stateMachineService    = stateMachineService;
     _stateMachineRepository = stateMachineRepository;
     _loggerService          = loggerService;
 }
Пример #8
0
 public BotController(
     IStateMachineService stateMachineService)
 {
     this.stateMachineService = stateMachineService;
 }
Пример #9
0
 public StateMachineController(IStateMachineService stateMachineService)
 {
     _stateMachineService = stateMachineService;
 }