Show / Hide Table of Contents

Class TransformationRule<T>

Defines a simple transformation rule of a transformation that has one input argument and an output

Inheritance
object
GeneralTransformationRule
TransformationRuleBase<T>
TransformationRule<T>
Inherited Members
TransformationRuleBase<T>.OutputType
TransformationRuleBase<T>.MarkInstantiatingFor(GeneralTransformationRule, Predicate<object[]>)
TransformationRuleBase<T>.GetRule(Type)
GeneralTransformationRule.RegisterDependencies()
GeneralTransformationRule.InputType
GeneralTransformationRule.Transformation
GeneralTransformationRule.Dependencies
GeneralTransformationRule.OutputDelayLevel
GeneralTransformationRule.TransformationDelayLevel
GeneralTransformationRule.IsUnique
GeneralTransformationRule.BaseRule
GeneralTransformationRule.IsInstantiating(Computation)
GeneralTransformationRule.HasCompliantInput(Computation)
GeneralTransformationRule.Require(GeneralTransformationRule)
GeneralTransformationRule.Call(GeneralTransformationRule)
GeneralTransformationRule.MarkInstantiatingFor(GeneralTransformationRule)
GeneralTransformationRule.MarkInstantiatingFor(GeneralTransformationRule, Predicate<Computation>)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Transformations
Assembly: NMF.Transformations.dll
Syntax
public abstract class TransformationRule<T> : TransformationRuleBase<T> where T : class
Type Parameters
Name Description
T

The type of the output

Remarks

Simple means that the transformation rule does not require a custom computation class

Constructors

| Edit this page View Source

TransformationRule()

Creates a new transformation rule

Declaration
public TransformationRule()

Properties

| Edit this page View Source

NeedDependenciesForOutputCreation

Gets a value indicating whether the output for all dependencies must have been created before this rule creates the output

Declaration
public override bool NeedDependenciesForOutputCreation { get; }
Property Value
Type Description
bool
Overrides
GeneralTransformationRule.NeedDependenciesForOutputCreation

Methods

| Edit this page View Source

CreateComputation(object[], IComputationContext)

Creates a new Computation instance for this transformation rule or the given input

Declaration
public override sealed Computation CreateComputation(object[] input, IComputationContext context)
Parameters
Type Name Description
object[] input

The input arguments for this computation

IComputationContext context

The context for this computation

Returns
Type Description
Computation

A computation object

Overrides
GeneralTransformationRule.CreateComputation(object[], IComputationContext)
| Edit this page View Source

CreateOutput(object[], ITransformationContext)

Initializes the transformation output

Declaration
public virtual T CreateOutput(object[] input, ITransformationContext context)
Parameters
Type Name Description
object[] input

The input of the transformation rule

ITransformationContext context

The context (and trace!) object

Returns
Type Description
T
Remarks

At this point, all the transformation outputs are created (also the delayed ones), thus, the trace is fully reliable

| Edit this page View Source

Transform(object[], T, ITransformationContext)

Creates the output of this transformation rule

Declaration
public virtual void Transform(object[] input, T output, ITransformationContext context)
Parameters
Type Name Description
object[] input

The input of the transformation rule

T output

The output of the transformation created previously

ITransformationContext context

The context (and trace!) object

Remarks

At this point, not all of the computations have created their output and thus, the trace is not complete. Use the OutputDelayLevel-feature to have the trace contain all elements created in earlier levels

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX