C# Class NMF.Transformations.Core.Transformation

This is the base class for transformations
Show file Open project: NMFCode/NMF Class Usage Examples

Private Properties

Property Type Description
ComputeInstantiatingTransformationRulePath Stack

Public Methods

Method Description
CreateContext ( ) : ITransformationContext

Creates a new transformation context

GetRuleForRuleType ( Type transformationRule ) : NMF.Transformations.Core.GeneralTransformationRule

Gets the rule with the specified type (exact match)

This method assumes there is only one transformation rule per type

GetRuleForTypeSignature ( Type inputTypes, Type outputType ) : NMF.Transformations.Core.GeneralTransformationRule

Gets any rules that apply the given signature

GetRulesExact ( Type input, Type output ) : IEnumerable

Gets all rules that apply the given signature exactly

GetRulesForInputTypes ( ) : IEnumerable

Gets the applicable rules for the given input type signature

GetRulesForRuleType ( Type transformationRule ) : IEnumerable

Gets all rules with the specified type (exact match)

This method assumes there is only one transformation rule per type

GetRulesForTypeSignature ( Type inputTypes, Type outputType ) : IEnumerable

Gets all rules that apply the given signature

GetRulesForTypeSignature ( Type input, Type output, bool exact ) : IEnumerable

Gets all rules that apply the given signature

Initialize ( ) : void

Initializes the transformation

RegisterRules ( ) : void

Registers the rules of this transformation

Protected Methods

Method Description
CreateRules ( ) : IEnumerable

Creates the transformation rules for this transformation

CreateRulesInternal ( ) : void

Creates the rules of this transformation

Private Methods

Method Description
ComputeInstantiatingTransformationRulePath ( NMF.Transformations.Core.Computation computation ) : Stack

Method Details

CreateContext() public method

Creates a new transformation context
public CreateContext ( ) : ITransformationContext
return ITransformationContext

CreateRules() protected abstract method

Creates the transformation rules for this transformation
protected abstract CreateRules ( ) : IEnumerable
return IEnumerable

CreateRulesInternal() protected method

Creates the rules of this transformation
protected CreateRulesInternal ( ) : void
return void

GetRuleForRuleType() public method

Gets the rule with the specified type (exact match)
This method assumes there is only one transformation rule per type
public GetRuleForRuleType ( Type transformationRule ) : NMF.Transformations.Core.GeneralTransformationRule
transformationRule System.Type The type of the transformation rule
return NMF.Transformations.Core.GeneralTransformationRule

GetRuleForTypeSignature() public method

Gets any rules that apply the given signature
public GetRuleForTypeSignature ( Type inputTypes, Type outputType ) : NMF.Transformations.Core.GeneralTransformationRule
inputTypes System.Type The input argument type list
outputType System.Type The output type
return NMF.Transformations.Core.GeneralTransformationRule

GetRulesExact() public method

Gets all rules that apply the given signature exactly
public GetRulesExact ( Type input, Type output ) : IEnumerable
input System.Type The input argument type list
output System.Type The output type
return IEnumerable

GetRulesForInputTypes() public method

Gets the applicable rules for the given input type signature
public GetRulesForInputTypes ( ) : IEnumerable
return IEnumerable

GetRulesForRuleType() public method

Gets all rules with the specified type (exact match)
This method assumes there is only one transformation rule per type
public GetRulesForRuleType ( Type transformationRule ) : IEnumerable
transformationRule System.Type The type of the transformation rules
return IEnumerable

GetRulesForTypeSignature() public method

Gets all rules that apply the given signature
public GetRulesForTypeSignature ( Type inputTypes, Type outputType ) : IEnumerable
inputTypes System.Type The input argument type list
outputType System.Type The output type
return IEnumerable

GetRulesForTypeSignature() public method

Gets all rules that apply the given signature
public GetRulesForTypeSignature ( Type input, Type output, bool exact ) : IEnumerable
input System.Type The input argument type list
output System.Type The output type
exact bool A value indicating whether the signatures must match exactly
return IEnumerable

Initialize() public method

Initializes the transformation
public Initialize ( ) : void
return void

RegisterRules() public method

Registers the rules of this transformation
public RegisterRules ( ) : void
return void