C# Class Vertesaur.Transformation.TransformationCastNode

Represents the from and to cast interpretations of a generically typed transformation.
Afficher le fichier Open project: aarondandy/vertesaur

Méthodes publiques

Méthode Description
FindCastPath ( IList transformations, Type startType, Type endType ) : Vertesaur.Transformation.TransformationCastNode[]

Finds a path through all the given transformations and determines the required to and from types for each transformation.

GenerateNodes ( ITransformation core ) : IEnumerable

Generates possible nodes for a given transformation.

GetTransformEnumerableValuesMethod ( ) : MethodInfo

Gets the method info for this specific cast of the transform values method.

GetTransformValueMethod ( ) : MethodInfo

Gets the method info for this specific cast of the transform value method.

TransformValue ( object value ) : object

Transforms a value using the current type selection.

TransformValues ( IEnumerable values ) : IEnumerable

Transforms a set of values using the current type selection.

TransformationCastNode ( ITransformation core, Type fromType, Type toType ) : System

Create a new transformation cast node.

Private Methods

Méthode Description
CodeContractInvariant ( ) : void
GetAllCandidateMethods ( ) : IEnumerable
IsValidTransformEnumerableValuesMethod ( MethodInfo m ) : bool
IsValidTransformValueMethod ( MethodInfo m ) : bool
MakeGenericEnumerableType ( Type itemType ) : Type
MakeGenericTransformationType ( ) : Type

Method Details

FindCastPath() public static méthode

Finds a path through all the given transformations and determines the required to and from types for each transformation.
public static FindCastPath ( IList transformations, Type startType, Type endType ) : Vertesaur.Transformation.TransformationCastNode[]
transformations IList The transformations to find a casting path between.
startType System.Type The from type of the first transformation.
endType System.Type The to type of the last transformation.
Résultat Vertesaur.Transformation.TransformationCastNode[]

GenerateNodes() public static méthode

Generates possible nodes for a given transformation.
public static GenerateNodes ( ITransformation core ) : IEnumerable
core ITransformation The transformation to generate cast information from.
Résultat IEnumerable

GetTransformEnumerableValuesMethod() public méthode

Gets the method info for this specific cast of the transform values method.
Thrown if the TransformValues method cannot be found at run time.
public GetTransformEnumerableValuesMethod ( ) : MethodInfo
Résultat System.Reflection.MethodInfo

GetTransformValueMethod() public méthode

Gets the method info for this specific cast of the transform value method.
Thrown if the TransformValue method cannot be found at run time.
public GetTransformValueMethod ( ) : MethodInfo
Résultat System.Reflection.MethodInfo

TransformValue() public méthode

Transforms a value using the current type selection.
public TransformValue ( object value ) : object
value object The value to transform.
Résultat object

TransformValues() public méthode

Transforms a set of values using the current type selection.
Thrown if one of the transformations returns a null enumerable.
public TransformValues ( IEnumerable values ) : IEnumerable
values IEnumerable The values to transform.
Résultat IEnumerable

TransformationCastNode() public méthode

Create a new transformation cast node.
public TransformationCastNode ( ITransformation core, Type fromType, Type toType ) : System
core ITransformation The transformation the cast information is related to.
fromType System.Type The selected from type.
toType System.Type The selected to type.
Résultat System