예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GetReactionRegistrationDependenciesStatusOp"/> class.
        /// </summary>
        /// <param name="reactionRegistration">The reaction registration.</param>
        public GetReactionRegistrationDependenciesStatusOp(
            ReactionRegistration reactionRegistration)
        {
            reactionRegistration.MustForArg(nameof(reactionRegistration)).NotBeNull();

            this.ReactionRegistration = reactionRegistration;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EvaluateReactionRegistrationOp"/> class.
        /// </summary>
        /// <param name="reactionRegistration">The <see cref="ReactionRegistration"/> to evaluate.</param>
        /// <param name="overrideRequired">Treat the reaction dependencies as if everything is optional (e.g. if you are triggering a reaction).</param>
        public EvaluateReactionRegistrationOp(
            ReactionRegistration reactionRegistration,
            bool overrideRequired = false)
        {
            reactionRegistration.MustForArg(nameof(reactionRegistration)).NotBeNull();

            this.ReactionRegistration = reactionRegistration;
            this.OverrideRequired     = overrideRequired;
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CompleteHandlingOnReactionRegistrationDependenciesOp"/> class.
        /// </summary>
        /// <param name="reactionRegistration">The reaction registration.</param>
        /// <param name="details">The details to add to the handling entry.</param>
        /// <param name="acceptableHandlingStatuses">Optional acceptable handling statuses of the dependencies; DEFAULT is <see cref="HandlingStatus.AvailableByDefault" /> only.</param>
        public CompleteHandlingOnReactionRegistrationDependenciesOp(
            ReactionRegistration reactionRegistration,
            string details,
            IReadOnlyCollection <HandlingStatus> acceptableHandlingStatuses = null)
        {
            reactionRegistration.MustForArg(nameof(reactionRegistration)).NotBeNull();

            this.ReactionRegistration = reactionRegistration;
            this.Details = details;
            this.AcceptableHandlingStatuses = acceptableHandlingStatuses
                                              ?? new[]
            {
                HandlingStatus.AvailableByDefault,
            };
        }