Class TransformationRule<TIn1, TIn2, TOut>
Defines a simple transformation rule of a transformation that has one input argument and an output
Inheritance
Inherited Members
Namespace: NMF.Transformations
Assembly: NMF.Transformations.dll
Syntax
public class TransformationRule<TIn1, TIn2, TOut> : TransformationRuleBase<TIn1, TIn2, TOut> where TIn1 : class where TIn2 : class where TOut : class
Type Parameters
Name | Description |
---|---|
TIn1 | The type of the first input argument |
TIn2 | The type of the second input argument |
TOut | The type of the output |
Remarks
Simple means that the transformation rule does not require a custom computation class
Constructors
| Edit this page View SourceTransformationRule()
Creates a new transformation rule
Declaration
public TransformationRule()
Properties
| Edit this page View SourceNeedDependenciesForOutputCreation
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
Methods
| Edit this page View SourceCreateComputation(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
| Edit this page View SourceCreateOutput(TIn1, TIn2, ITransformationContext)
Creates the output of this transformation rule
Declaration
public virtual TOut CreateOutput(TIn1 input1, TIn2 input2, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
TIn1 | input1 | The first input of the transformation rule |
TIn2 | input2 | The second input of the transformation rule |
ITransformationContext | context | The context (and trace!) object |
Returns
Type | Description |
---|---|
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(TIn1, TIn2, TOut, ITransformationContext)
Initializes the transformation output
Declaration
public virtual void Transform(TIn1 input1, TIn2 input2, TOut output, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
TIn1 | input1 | The first input of the transformation rule |
TIn2 | input2 | The second input of the transformation rule |
TOut | output | The output of the transformation rule generated earlier |
ITransformationContext | context | The context (and trace!) object |
Remarks
At this point, all the transformation outputs are created (also the delayed ones), thus, the trace is fully reliable