コード例 #1
0
        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="name">Decision unique name</param>
        /// <param name="requiredInputs">Decision required inputs (input variables)</param>
        /// <param name="requiredDecisions">List of decisions, the decision depends on</param>
        /// <exception cref="ArgumentNullException"><paramref name="name"/>, <paramref name="requiredInputs"/> or <paramref name="requiredDecisions"/> is null</exception>
        /// <exception cref="ArgumentException">Name is empty</exception>
        protected DmnDecision(string name, List <DmnVariableDefinition> requiredInputs, List <IDmnDecision> requiredDecisions)
        {
            Logger            = CommonLogging.CreateLogger(GetType());
            Name              = name ?? throw Logger.Fatal <ArgumentNullException>($"{nameof(name)} is null");
            RequiredInputs    = requiredInputs ?? throw Logger.Fatal <ArgumentNullException>($"{nameof(requiredInputs)} is null");
            RequiredDecisions = requiredDecisions ?? throw Logger.Fatal <ArgumentNullException>($"{nameof(requiredDecisions)} is null");

            if (string.IsNullOrWhiteSpace(name))
            {
                throw Logger.Fatal <ArgumentNullException>($"{nameof(name)} is empty");
            }
        }
コード例 #2
0
 /// <summary>
 /// CTOR
 /// </summary>
 /// <param name="variables">Variable catalog of of <see cref="DmnDefinitionBuilder"/></param>
 /// <param name="decisions">Decisions catalog of of <see cref="DmnDefinitionBuilder"/></param>
 protected DmnBuilderElement(VariableCatalog variables, DecisionCatalog decisions)
 {
     Logger    = CommonLogging.CreateLogger(GetType());
     Variables = variables ?? throw new ArgumentNullException(nameof(variables));
     Decisions = decisions ?? throw new ArgumentNullException(nameof(decisions));
 }