Beispiel #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;
        }
        public EvaluateReactionRegistrationOp DeepCloneWithReactionRegistration(ReactionRegistration reactionRegistration)
        {
            var result = new EvaluateReactionRegistrationOp(
                reactionRegistration,
                this.OverrideRequired.DeepClone());

            return(result);
        }
        /// <summary>
        /// Builds the handling concern to use for evaluating dependencies of a <see cref="ReactionRegistration"/>.
        /// </summary>
        /// <param name="reactionRegistration">The reaction registration.</param>
        /// <param name="recordFilterEntry">The record filter entry.</param>
        /// <returns>Handling concern to use.</returns>
        public static string BuildHandlingConcern(
            ReactionRegistration reactionRegistration,
            RecordFilterEntry recordFilterEntry)
        {
            var concern = Invariant($"{reactionRegistration.Id}_{recordFilterEntry.Id}");

            return(concern);
        }
        /// <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;
        }
Beispiel #5
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,
            };
        }
Beispiel #6
0
        public CompleteHandlingOnReactionRegistrationDependenciesOp DeepCloneWithReactionRegistration(ReactionRegistration reactionRegistration)
        {
            var result = new CompleteHandlingOnReactionRegistrationDependenciesOp(
                reactionRegistration,
                this.Details?.DeepClone(),
                this.AcceptableHandlingStatuses?.DeepClone());

            return(result);
        }
Beispiel #7
0
        public GetReactionRegistrationDependenciesStatusOp DeepCloneWithReactionRegistration(ReactionRegistration reactionRegistration)
        {
            var result = new GetReactionRegistrationDependenciesStatusOp(
                reactionRegistration);

            return(result);
        }