示例#1
0
        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="variables"><see cref="VariableCatalog"/> managing the definition builder variables</param>
        /// <param name="decisions"><see cref="DecisionCatalog"/> managing the definition builder decisions</param>
        /// <param name="allTableInputs">All inputs defined for table (by reference)</param>
        /// <param name="allTableOutputs">All outputs defined for table (by reference)</param>
        /// <param name="index">Index of the rule (order)</param>
        /// <param name="name">Table unique rule name</param>
        /// <param name="description">Optional rule description</param>
        internal TableRule(
            VariableCatalog variables, DecisionCatalog decisions,
            IReadOnlyDictionary <TableInput.Ref, TableInput> allTableInputs, IReadOnlyDictionary <TableOutput.Ref, TableOutput> allTableOutputs,
            int index, string name, string description = null)
            : base(variables, decisions)
        {
            Index       = index;
            Name        = name;
            Description = description;

            AllTableInputs  = allTableInputs ?? throw new ArgumentNullException(nameof(allTableInputs));
            AllTableOutputs = allTableOutputs ?? throw new ArgumentNullException(nameof(allTableOutputs));
        }
示例#2
0
        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="variables"><see cref="VariableCatalog"/> managing the definition builder variables</param>
        /// <param name="decisions"><see cref="DecisionCatalog"/> managing the definition builder decisions</param>
        /// <param name="name">Name of the variable</param>
        /// <param name="type">Optional Type of the variable if known</param>
        internal Variable(VariableCatalog variables, DecisionCatalog decisions, string name, Type type = null)
            : base(variables, decisions)
        {
            name = DmnVariableDefinition.NormalizeVariableName(name ?? throw new ArgumentNullException(nameof(name)));
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Name not provided", nameof(name));
            }

            Reference = RefCtor(this);
            Name      = name;
            Type      = type;
        }
示例#3
0
        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="variables"><see cref="VariableCatalog"/> managing the definition builder variables</param>
        /// <param name="decisions"><see cref="DecisionCatalog"/> managing the definition builder decisions</param>
        /// <param name="name">Unique name of the decision</param>
        protected Decision(VariableCatalog variables, DecisionCatalog decisions, string name) : base(variables,
                                                                                                     decisions)
        {
            if (name is null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Missing name", nameof(name));
            }

            Name      = name;
            Reference = RefCtor(this);
        }
示例#4
0
 /// <summary>
 /// CTOR
 /// </summary>
 /// <param name="variables"><see cref="VariableCatalog"/> managing the definition builder variables</param>
 /// <param name="decisions"><see cref="DecisionCatalog"/> managing the definition builder decisions</param>
 /// <param name="index">Index of the input (order)</param>
 internal TableInput(VariableCatalog variables, DecisionCatalog decisions, int index)
     : base(variables, decisions)
 {
     Index     = index;
     Reference = RefCtor(this);
 }
示例#5
0
 /// <summary>
 /// CTOR
 /// </summary>
 /// <param name="variables"><see cref="VariableCatalog"/> managing the definition builder variables</param>
 /// <param name="decisions"><see cref="DecisionCatalog"/> managing the definition builder decisions</param>
 /// <param name="name">Unique name of the decision</param>
 internal ExpressionDecision(VariableCatalog variables, DecisionCatalog decisions, string name)
     : base(variables, decisions, name)
 {
 }
 /// <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));
 }