C# Class FluentValidation.Internal.PropertyChain

Represents a chain of properties
Exibir arquivo Open project: JeremySkinner/FluentValidation Class Usage Examples

Public Methods

Method Description
Add ( MemberInfo member ) : void

Adds a MemberInfo instance to the chain

Add ( string propertyName ) : void

Adds a property name to the chain

AddIndexer ( object indexer ) : void

Adds an indexer to the property chain. For example, if the following chain has been constructed: Parent.Child then calling AddIndexer(0) would convert this to: Parent.Child[0]

BuildPropertyName ( string propertyName ) : string

Builds a property path.

FromExpression ( LambdaExpression expression ) : PropertyChain

Creates a PropertyChain from a lambda expresion

IsChildChainOf ( PropertyChain parentChain ) : bool

Checks if the current chain is the child of another chain. For example, if chain1 were for "Parent.Child" and chain2 were for "Parent.Child.GrandChild" then chain2.IsChildChainOf(chain1) would be true.

PropertyChain ( ) : System

Creates a new PropertyChain.

PropertyChain ( IEnumerable memberNames ) : System

Creates a new PropertyChain

PropertyChain ( PropertyChain parent ) : System

Creates a new PropertyChain based on another.

ToString ( ) : string

Creates a string representation of a property chain.

Method Details

Add() public method

Adds a MemberInfo instance to the chain
public Add ( MemberInfo member ) : void
member System.Reflection.MemberInfo Member to add
return void

Add() public method

Adds a property name to the chain
public Add ( string propertyName ) : void
propertyName string Name of the property to add
return void

AddIndexer() public method

Adds an indexer to the property chain. For example, if the following chain has been constructed: Parent.Child then calling AddIndexer(0) would convert this to: Parent.Child[0]
public AddIndexer ( object indexer ) : void
indexer object
return void

BuildPropertyName() public method

Builds a property path.
public BuildPropertyName ( string propertyName ) : string
propertyName string
return string

FromExpression() public static method

Creates a PropertyChain from a lambda expresion
public static FromExpression ( LambdaExpression expression ) : PropertyChain
expression System.Linq.Expressions.LambdaExpression
return PropertyChain

IsChildChainOf() public method

Checks if the current chain is the child of another chain. For example, if chain1 were for "Parent.Child" and chain2 were for "Parent.Child.GrandChild" then chain2.IsChildChainOf(chain1) would be true.
public IsChildChainOf ( PropertyChain parentChain ) : bool
parentChain PropertyChain The parent chain to compare
return bool

PropertyChain() public method

Creates a new PropertyChain.
public PropertyChain ( ) : System
return System

PropertyChain() public method

Creates a new PropertyChain
public PropertyChain ( IEnumerable memberNames ) : System
memberNames IEnumerable
return System

PropertyChain() public method

Creates a new PropertyChain based on another.
public PropertyChain ( PropertyChain parent ) : System
parent PropertyChain
return System

ToString() public method

Creates a string representation of a property chain.
public ToString ( ) : string
return string