ModelBuilder.CreationRule.CreationRule C# (CSharp) Method

CreationRule() public method

Initializes a new instance of the CreationRule class.
The parameter is null. The parameter is null.
public CreationRule ( Func evaluator, int priority, Func creator ) : System
evaluator Func The function that determines whether the rule is a match.
priority int The priority of the rule.
creator Func The function that creates the value for the rule.
return System
        public CreationRule(
            Func<Type, string, bool> evaluator,
            int priority,
            Func<Type, string, LinkedList<object>, object> creator)
        {
            if (evaluator == null)
            {
                throw new ArgumentNullException(nameof(evaluator));
            }

            if (creator == null)
            {
                throw new ArgumentNullException(nameof(creator));
            }

            _evaluator = evaluator;
            _creator = creator;
            Priority = priority;
        }

Same methods

CreationRule::CreationRule ( Func evaluator, int priority, object value ) : System
CreationRule::CreationRule ( Type targetType, Regex propertyExpression, int priority, Func creator ) : System
CreationRule::CreationRule ( Type targetType, Regex propertyExpression, int priority, object value ) : System
CreationRule::CreationRule ( Type targetType, string propertyName, int priority, Func creator ) : System
CreationRule::CreationRule ( Type targetType, string propertyName, int priority, object value ) : System