/// <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);
        }
예제 #2
0
 public DomainContextService(IDomainContextRepository domainContextRepository)
 {
     this._domainContextRepository = domainContextRepository;
 }