/// <summary>
        /// Initializes a new instance of the <see cref="RunScheduleProtocol"/> class.
        /// </summary>
        /// <param name="registeredScheduleStream">The registered reaction stream.</param>
        /// <param name="executeOpOnScheduleProtocol">The evaluate registered reaction protocol.</param>
        public RunScheduleProtocol(
            IStandardStream registeredScheduleStream,
            ISyncAndAsyncVoidProtocol <ExecuteOpOnScheduleOp> executeOpOnScheduleProtocol)
        {
            registeredScheduleStream.MustForArg(nameof(registeredScheduleStream)).NotBeNull();
            executeOpOnScheduleProtocol.MustForArg(nameof(executeOpOnScheduleProtocol)).NotBeNull();

            this.registeredScheduleStream    = registeredScheduleStream;
            this.executeOpOnScheduleProtocol = executeOpOnScheduleProtocol;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RunReactorProtocol"/> class.
        /// </summary>
        /// <param name="reactionRegistrationStream">The registered reaction stream.</param>
        /// <param name="reactionStream">The reaction stream.</param>
        /// <param name="evaluateReactionRegistrationProtocol">The evaluate registered reaction protocol.</param>
        public RunReactorProtocol(
            IStandardStream reactionRegistrationStream,
            IStandardStream reactionStream,
            ISyncAndAsyncReturningProtocol <EvaluateReactionRegistrationOp, EvaluateReactionRegistrationResult> evaluateReactionRegistrationProtocol)
        {
            reactionRegistrationStream.MustForArg(nameof(reactionRegistrationStream)).NotBeNull();
            reactionStream.MustForArg(nameof(reactionStream)).NotBeNull();
            evaluateReactionRegistrationProtocol.MustForArg(nameof(evaluateReactionRegistrationProtocol)).NotBeNull();

            this.reactionRegistrationStream           = reactionRegistrationStream;
            this.reactionStream                       = reactionStream;
            this.evaluateReactionRegistrationProtocol = evaluateReactionRegistrationProtocol;
        }
        public HandleAndReQueueExecuteOpRequestedProtocol(
            IStandardStream requeueStream,
            ISyncVoidProtocol <TOperation> executeOperationProtocol,
            TimeSpan waitTimeBeforeQueuing,
            ExistingRecordStrategy existingRecordStrategyOnRequeue,
            int?recordRetentionCountOnRequeue)
        {
            requeueStream.MustForArg(nameof(requeueStream)).NotBeNull();
            executeOperationProtocol.MustForArg(nameof(executeOperationProtocol)).NotBeNull();
            existingRecordStrategyOnRequeue.MustForArg(nameof(existingRecordStrategyOnRequeue)).NotBeEqualTo(ExistingRecordStrategy.Unknown);

            this.requeueStream                   = requeueStream;
            this.executeOperationProtocol        = executeOperationProtocol;
            this.waitTimeBeforeQueuing           = waitTimeBeforeQueuing;
            this.existingRecordStrategyOnRequeue = existingRecordStrategyOnRequeue;
            this.recordRetentionCountOnRequeue   = recordRetentionCountOnRequeue;
        }