C# Class ModelBuilder.CreationRule

The CreationRule class is used to define simple value creation rules that bypass ITypeCreator and IValueGenerator usages.
Datei anzeigen Open project: roryprimrose/ModelBuilder

Public Methods

Method Description
Create ( Type type, string propertyName, LinkedList buildChain ) : object

Creates a value using the specified type, property name and context.

CreationRule ( Func evaluator, int priority, Func creator ) : System

Initializes a new instance of the CreationRule class.

CreationRule ( Func evaluator, int priority, object value ) : System

Initializes a new instance of the CreationRule class.

CreationRule ( Type targetType, Regex propertyExpression, int priority, Func creator ) : System

Initializes a new instance of the CreationRule class.

CreationRule ( Type targetType, Regex propertyExpression, int priority, object value ) : System

Initializes a new instance of the CreationRule class.

CreationRule ( Type targetType, string propertyName, int priority, Func creator ) : System

Initializes a new instance of the CreationRule class.

CreationRule ( Type targetType, string propertyName, int priority, object value ) : System

Initializes a new instance of the CreationRule class.

IsMatch ( Type type, string propertyName ) : bool

Gets whether the specified type and property name match this rule.

Method Details

Create() public method

Creates a value using the specified type, property name and context.
public Create ( Type type, string propertyName, LinkedList buildChain ) : object
type System.Type The type to match.
propertyName string The property name to match.
buildChain LinkedList The chain of instances built up to this point.
return object

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

CreationRule() public method

Initializes a new instance of the CreationRule class.
The parameter is null.
public CreationRule ( Func evaluator, int priority, object value ) : System
evaluator Func The function that determines whether the rule is a match.
priority int The priority of the rule.
value object The static value returned by the rule.
return System

CreationRule() public method

Initializes a new instance of the CreationRule class.
The and parameters are both null. The parameter is null.
public CreationRule ( Type targetType, Regex propertyExpression, int priority, Func creator ) : System
targetType System.Type The target type that matches the rule.
propertyExpression System.Text.RegularExpressions.Regex The property name regular expression that matches the rule.
priority int The priority of the rule.
creator Func The function that creates the value for the rule.
return System

CreationRule() public method

Initializes a new instance of the CreationRule class.
The and parameters are both null.
public CreationRule ( Type targetType, Regex propertyExpression, int priority, object value ) : System
targetType System.Type The target type that matches the rule.
propertyExpression System.Text.RegularExpressions.Regex The property name regular expression that matches the rule.
priority int The priority of the rule.
value object The static value returned by the rule.
return System

CreationRule() public method

Initializes a new instance of the CreationRule class.
The and parameters are both null. The parameter is null.
public CreationRule ( Type targetType, string propertyName, int priority, Func creator ) : System
targetType System.Type The target type that matches the rule.
propertyName string The property name that matches the rule.
priority int The priority of the rule.
creator Func The function that creates the value for the rule.
return System

CreationRule() public method

Initializes a new instance of the CreationRule class.
The and parameters are both null.
public CreationRule ( Type targetType, string propertyName, int priority, object value ) : System
targetType System.Type The target type that matches the rule.
propertyName string The property name that matches the rule.
priority int The priority of the rule.
value object The static value returned by the rule.
return System

IsMatch() public method

Gets whether the specified type and property name match this rule.
public IsMatch ( Type type, string propertyName ) : bool
type System.Type The type to match.
propertyName string The property name to match.
return bool