C# Class FluentValidation.Internal.PropertyChain

Represents a chain of properties
Afficher le fichier Open project: JeremySkinner/FluentValidation Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

Add() public méthode

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

AddIndexer() public méthode

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
Résultat void

BuildPropertyName() public méthode

Builds a property path.
public BuildPropertyName ( string propertyName ) : string
propertyName string
Résultat string

FromExpression() public static méthode

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

IsChildChainOf() public méthode

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
Résultat bool

PropertyChain() public méthode

Creates a new PropertyChain.
public PropertyChain ( ) : System
Résultat System

PropertyChain() public méthode

Creates a new PropertyChain
public PropertyChain ( IEnumerable memberNames ) : System
memberNames IEnumerable
Résultat System

PropertyChain() public méthode

Creates a new PropertyChain based on another.
public PropertyChain ( PropertyChain parent ) : System
parent PropertyChain
Résultat System

ToString() public méthode

Creates a string representation of a property chain.
public ToString ( ) : string
Résultat string