C# Class Vertesaur.Transformation.TransformationCastNode

Represents the from and to cast interpretations of a generically typed transformation.
Datei anzeigen Open project: aarondandy/vertesaur

Public Methods

Method 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

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

Method Details

FindCastPath() public static method

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.
return Vertesaur.Transformation.TransformationCastNode[]

GenerateNodes() public static method

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

GetTransformEnumerableValuesMethod() public method

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
return System.Reflection.MethodInfo

GetTransformValueMethod() public method

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
return System.Reflection.MethodInfo

TransformValue() public method

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

TransformValues() public method

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.
return IEnumerable

TransformationCastNode() public method

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.
return System