/// <summary> /// Initializes a new instance of the <see cref="ExecuteOpOnScheduleProtocol"/> class. /// </summary> /// <param name="scheduleExecutionReadStream">The schedule execution read stream.</param> /// <param name="scheduleExecutionWriteStream">The schedule execution write stream.</param> /// <param name="protocolFactory">The factory to determine the appropriate protocol to execute the scheduled operation.</param> /// <param name="evaluateScheduleProtocol">The protocol to evaluate schedules.</param> public ExecuteOpOnScheduleProtocol( IReadOnlyStream scheduleExecutionReadStream, IWriteOnlyStream scheduleExecutionWriteStream, IProtocolFactory protocolFactory, ISyncAndAsyncReturningProtocol <EvaluateScheduleOp, bool> evaluateScheduleProtocol) { scheduleExecutionReadStream.MustForArg(nameof(scheduleExecutionReadStream)).NotBeNull(); scheduleExecutionWriteStream.MustForArg(nameof(scheduleExecutionWriteStream)).NotBeNull(); protocolFactory.MustForArg(nameof(protocolFactory)).NotBeNull(); evaluateScheduleProtocol.MustForArg(nameof(evaluateScheduleProtocol)).NotBeNull(); this.scheduleExecutionReadStream = scheduleExecutionReadStream; this.scheduleExecutionWriteStream = scheduleExecutionWriteStream; this.protocolFactory = protocolFactory; this.evaluateScheduleProtocol = evaluateScheduleProtocol; }