Class TransformationRule<TIn, TOut>
- Namespace
- NMF.Transformations
- Assembly
- NMF.Transformations.dll
Defines a simple transformation rule of a transformation that has one input argument and an output
public class TransformationRule<TIn, TOut> : TransformationRuleBase<TIn, TOut> where TIn : class where TOut : class
Type Parameters
TInThe type of the input argument
TOutThe type of the output
- Inheritance
-
TransformationRuleBase<TIn, TOut>TransformationRule<TIn, TOut>
- Derived
- Inherited Members
- Extension Methods
Remarks
Simple means that the transformation rule does not require a custom computation class
Constructors
TransformationRule()
Creates a new transformation rule
public TransformationRule()
Properties
NeedDependenciesForOutputCreation
Gets a value indicating whether the output for all dependencies must have been created before this rule creates the output
public override bool NeedDependenciesForOutputCreation { get; }
Property Value
Methods
CreateComputation(object[], IComputationContext)
Creates a new Computation instance for this transformation rule or the given input
public override sealed Computation CreateComputation(object[] input, IComputationContext context)
Parameters
inputobject[]The input arguments for this computation
contextIComputationContextThe context for this computation
Returns
- Computation
A computation object
CreateOutput(TIn, ITransformationContext)
Creates the output of this transformation rule
public virtual TOut CreateOutput(TIn input, ITransformationContext context)
Parameters
inputTInThe input of the transformation rule
contextITransformationContextThe context (and trace!) object
Returns
- TOut
The output for this transformation under this input
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
Transform(TIn, TOut, ITransformationContext)
Initializes the transformation output
public virtual void Transform(TIn input, TOut output, ITransformationContext context)
Parameters
inputTInThe input of the transformation rule
outputTOutThe output of the transformation rule generated earlier
contextITransformationContextThe context (and trace!) object
Remarks
At this point, all the transformation outputs are created (also the delayed ones), thus, the trace is fully reliable