Show / Hide Table of Contents

Class Transformation

This is the base class for transformations

Inheritance
object
Transformation
Synchronization
ReflectiveTransformation
MockTransformation
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Transformations.Core
Assembly: NMF.Transformations.Core.dll
Syntax
public abstract class Transformation

Properties

| Edit this page View Source

IsInitialized

Gets a value indicating whether the transformation has been initialized yet

Declaration
public bool IsInitialized { get; protected set; }
Property Value
Type Description
bool
| Edit this page View Source

IsRulesRegistered

Gets a value indicating whether the transformation has registered its rules requirements

Declaration
public bool IsRulesRegistered { get; protected set; }
Property Value
Type Description
bool
| Edit this page View Source

MaxOutputDelay

Gets the maximum output delay level

Declaration
public virtual byte MaxOutputDelay { get; }
Property Value
Type Description
byte
| Edit this page View Source

MaxTransformationDelay

Gets the maximum transformation delay level

Declaration
public virtual byte MaxTransformationDelay { get; }
Property Value
Type Description
byte
| Edit this page View Source

Patterns

Gets a collection of pattern objects used within the transformation

Declaration
public ICollection<ITransformationPattern> Patterns { get; }
Property Value
Type Description
ICollection<ITransformationPattern>
| Edit this page View Source

Rules

Gets a collection of all rules of this transformation

Declaration
public IList<GeneralTransformationRule> Rules { get; }
Property Value
Type Description
IList<GeneralTransformationRule>

Methods

| Edit this page View Source

ComputeInstantiatingTransformationRulePath(Computation)

Computes the path of transformation rules for a given input

Declaration
public virtual Stack<GeneralTransformationRule> ComputeInstantiatingTransformationRulePath(Computation computation)
Parameters
Type Name Description
Computation computation

The computation for which to compute the instantiating rule path

Returns
Type Description
Stack<GeneralTransformationRule>

A stack of transformation rules that are involved with the output creation. The top element of the stack should be able to instantiate the output (i.e. must not be abstract)

| Edit this page View Source

CreateContext()

Creates a new transformation context

Declaration
public virtual ITransformationContext CreateContext()
Returns
Type Description
ITransformationContext
| Edit this page View Source

CreateRules()

Creates the transformation rules for this transformation

Declaration
protected abstract IEnumerable<GeneralTransformationRule> CreateRules()
Returns
Type Description
IEnumerable<GeneralTransformationRule>

A collection of transformation rules

| Edit this page View Source

CreateRulesInternal()

Creates the rules of this transformation

Declaration
protected void CreateRulesInternal()
| Edit this page View Source

GetRuleForRuleType(Type)

Gets the rule with the specified type (exact match)

Declaration
public virtual 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

Remarks

This method assumes there is only one transformation rule per type

| Edit this page View Source

GetRuleForTypeSignature(Type[], Type)

Gets any rules that apply the given signature

Declaration
public virtual GeneralTransformationRule GetRuleForTypeSignature(Type[] inputTypes, Type outputType)
Parameters
Type Name Description
Type[] inputTypes

The input argument type list

Type outputType

The output type

Returns
Type Description
GeneralTransformationRule

A random rule that has the given signature

| Edit this page View Source

GetRulesExact(Type[], Type)

Gets all rules that apply the given signature exactly

Declaration
public virtual IEnumerable<GeneralTransformationRule> GetRulesExact(Type[] input, Type output)
Parameters
Type Name Description
Type[] input

The input argument type list

Type output

The output type

Returns
Type Description
IEnumerable<GeneralTransformationRule>

A collection with all the rules that have the given signature

| Edit this page View Source

GetRulesForInputTypes(params Type[])

Gets the applicable rules for the given input type signature

Declaration
public virtual IEnumerable<GeneralTransformationRule> GetRulesForInputTypes(params Type[] input)
Parameters
Type Name Description
Type[] input

The signature of the input types

Returns
Type Description
IEnumerable<GeneralTransformationRule>

A collection of rules that are applicable for this signature

| Edit this page View Source

GetRulesForRuleType(Type)

Gets all rules with the specified type (exact match)

Declaration
public virtual 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

Remarks

This method assumes there is only one transformation rule per type

| Edit this page View Source

GetRulesForTypeSignature(Type[], Type)

Gets all rules that apply the given signature

Declaration
public virtual IEnumerable<GeneralTransformationRule> GetRulesForTypeSignature(Type[] inputTypes, Type outputType)
Parameters
Type Name Description
Type[] inputTypes

The input argument type list

Type outputType

The output type

Returns
Type Description
IEnumerable<GeneralTransformationRule>

A collection with all the rules that have the given signature

| Edit this page View Source

GetRulesForTypeSignature(Type[], Type, bool)

Gets all rules that apply the given signature

Declaration
public IEnumerable<GeneralTransformationRule> GetRulesForTypeSignature(Type[] input, Type output, bool exact)
Parameters
Type Name Description
Type[] input

The input argument type list

Type output

The output type

bool exact

A value indicating whether the signatures must match exactly

Returns
Type Description
IEnumerable<GeneralTransformationRule>

A collection with all the rules that have the given signature

| Edit this page View Source

Initialize()

Initializes the transformation

Declaration
public virtual void Initialize()
| Edit this page View Source

RegisterRules()

Registers the rules of this transformation

Declaration
public virtual void RegisterRules()
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX