/// <summary> /// Initializes a new instance of the <see cref="WorkflowService" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="workflowRepository">The workflow repository.</param> /// <param name="sitecoreFactory">The sitecore factory.</param> public WorkflowService(IWorkflowLogger logger, IWorkflowRepository workflowRepository, ISitecoreFactory sitecoreFactory) { this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); this._workflowRepository = workflowRepository ?? throw new ArgumentNullException(nameof(workflowRepository)); this._sitecoreFactory = sitecoreFactory ?? throw new ArgumentNullException(nameof(sitecoreFactory)); }
public WorkflowRepository(IWorkflowLogger logger, ISitecoreFactory sitecoreFactory) { this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); this._sitecoreFactory = sitecoreFactory ?? throw new ArgumentNullException(nameof(sitecoreFactory)); this._masterDatabase = this._sitecoreFactory.GetDatabase(Constants.Databases.Master); }