Class ReflectiveTransformation
This is a base class of a transformation that just creates an instance of each nested class, if it is not abstract and is a transformation rule
Inheritance
Inherited Members
Namespace: NMF.Transformations
Assembly: NMF.Transformations.dll
Syntax
public abstract class ReflectiveTransformation : Transformation
Methods
| Edit this page View SourceCreateCustomRules()
Creates the transformation rules that are no public nested classes (cannot be overridenn by reflected rules)
Declaration
protected virtual IEnumerable<GeneralTransformationRule> CreateCustomRules()
Returns
Type | Description |
---|---|
IEnumerable<GeneralTransformationRule> | A collection of transformation rules |
CreateDefaultRules()
Creates the default transformation rules (can be overridden by reflected rules)
Declaration
protected virtual IEnumerable<GeneralTransformationRule> CreateDefaultRules()
Returns
Type | Description |
---|---|
IEnumerable<GeneralTransformationRule> | A collection of transformation rules |
CreateRules()
Creates all transformation rules of this transformation
Declaration
protected override sealed IEnumerable<GeneralTransformationRule> CreateRules()
Returns
Type | Description |
---|---|
IEnumerable<GeneralTransformationRule> | A collection of transformation rules |
Overrides
Remarks
This method is called during Initialization. The output IEnumerable-collection is saved into a list.
GetRuleForRuleType(Type)
Gets the rule with the specified type (exact match)
Declaration
public override GeneralTransformationRule GetRuleForRuleType(Type transformationRule)
Parameters
Type | Name | Description |
---|---|---|
Type | transformationRule | The type of the transformation rule |
Returns
Type | Description |
---|---|
GeneralTransformationRule | The transformation rule with this type or null, if there is none |
Overrides
Remarks
This method assumes there is only one transformation rule per type
GetRulesForRuleType(Type)
Gets all rules with the specified type (exact match)
Declaration
public override IEnumerable<GeneralTransformationRule> GetRulesForRuleType(Type transformationRule)
Parameters
Type | Name | Description |
---|---|---|
Type | transformationRule | The type of the transformation rules |
Returns
Type | Description |
---|---|
IEnumerable<GeneralTransformationRule> | A collection of all rules with this type |
Overrides
Remarks
This method assumes there is only one transformation rule per type
RegisterRules()
Registers the rules of this transformation
Declaration
public override void RegisterRules()
Overrides
| Edit this page View SourceRule<TRule>()
Gets the transformation rule instance of the given rule type within the given transformation
Declaration
public TRule Rule<TRule>() where TRule : GeneralTransformationRule
Returns
Type | Description |
---|---|
TRule | The transformation rule |
Type Parameters
Name | Description |
---|---|
TRule | The type of the desired transformation rule |