コード例 #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
ファイル: GrpcStateEngine.cs プロジェクト: psibr/REstate
        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;
 }
コード例 #4
0
        /// <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;
        }
コード例 #7
0
 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;
 }