Show / Hide Table of Contents

Class GeneralTransformationRule

This class represents the base class for a transformation rule

Inheritance
object
GeneralTransformationRule
GeneralTransformationRule<TIn>
GeneralTransformationRule<TIn1, TIn2>
InPlaceTransformationRuleBase
TransformationRuleBase<T>
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 GeneralTransformationRule

Constructors

| Edit this page View Source

GeneralTransformationRule()

Creates a new transformation rule

Declaration
protected GeneralTransformationRule()

Properties

| Edit this page View Source

BaseRule

Gets the base rule, i.e. the rule the current rule can instantiate

Declaration
public GeneralTransformationRule BaseRule { get; }
Property Value
Type Description
GeneralTransformationRule
| Edit this page View Source

Dependencies

Gets a collection of dependencies for this transformation rule

Declaration
public IList<ITransformationRuleDependency> Dependencies { get; }
Property Value
Type Description
IList<ITransformationRuleDependency>
| Edit this page View Source

InputType

Gets the type signature of the input arguments of this transformation rule

Declaration
public abstract Type[] InputType { get; }
Property Value
Type Description
Type[]
| Edit this page View Source

IsUnique

Gets or sets a value indicating whether this transformation rule is unique per input and context

Declaration
public bool IsUnique { get; set; }
Property Value
Type Description
bool
| 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 virtual bool NeedDependenciesForOutputCreation { get; }
Property Value
Type Description
bool
| Edit this page View Source

OutputDelayLevel

Gets or sets the output delay level

Declaration
public byte OutputDelayLevel { get; protected set; }
Property Value
Type Description
byte
Remarks

The default delay level is 0. The delay level has an influence on the availability of the trace data during output creation.

| Edit this page View Source

OutputType

Gets the type signature of the output type of this transformation

Declaration
public abstract Type OutputType { get; }
Property Value
Type Description
Type
| Edit this page View Source

Transformation

Gets the transformation, that this rule is assigned to

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

TransformationDelayLevel

Gets or sets the transformation delay level

Declaration
public byte TransformationDelayLevel { get; protected set; }
Property Value
Type Description
byte
Remarks

The default transformation delay level is 0. The delay has an influence when computations are made

Methods

| Edit this page View Source

Call(GeneralTransformationRule)

Requires the given transformation rule

Declaration
public void Call(GeneralTransformationRule rule)
Parameters
Type Name Description
GeneralTransformationRule rule

The transformation rule that should be required

Remarks

This version Always takes the input parameter as input for the dependent transformations. Thus, this method will throw an exception, if the types do not match

| Edit this page View Source

CreateComputation(object[], IComputationContext)

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

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

| Edit this page View Source

HasCompliantInput(Computation)

Gets a value indicating whether the given computation has a compliant input to be instantiated by the current transformation rule

Declaration
public bool HasCompliantInput(Computation computation)
Parameters
Type Name Description
Computation computation

The computation that is a candidate for instantiation

Returns
Type Description
bool

True, if the input arguments match the input types of the current transformation rule, otherwise false

| Edit this page View Source

IsInstantiating(Computation)

Determines whether the current transformation rule can instantiate the output of the given computation

Declaration
public bool IsInstantiating(Computation computation)
Parameters
Type Name Description
Computation computation

The computation that may be instantiated by the current rule

Returns
Type Description
bool

True, if the computation instantiates the given computation, otherwise false

| Edit this page View Source

MarkInstantiatingFor(GeneralTransformationRule)

Marks the current transformation rule instantiating for the specified rule

Declaration
public void MarkInstantiatingFor(GeneralTransformationRule rule)
Parameters
Type Name Description
GeneralTransformationRule rule

The base transformation rule

| Edit this page View Source

MarkInstantiatingFor(GeneralTransformationRule, Predicate<Computation>)

Marks the current transformation rule instantiating for the specified rule

Declaration
public void MarkInstantiatingFor(GeneralTransformationRule rule, Predicate<Computation> filter)
Parameters
Type Name Description
GeneralTransformationRule rule

The base transformation rule

Predicate<Computation> filter

A method that filters the possible computations

Remarks

Note that in this version, the filter method is also responsible for checking the types!

| Edit this page View Source

RegisterDependencies()

Registers all the dependencies (both calling and non-calling) and additional configuration

Declaration
public virtual void RegisterDependencies()
Remarks

This method is called during initialization of the entire transformation and is independent of any transformation contexts. However, this method may rely on the Transformation-property.

| Edit this page View Source

Require(GeneralTransformationRule)

Requires the given transformation rule

Declaration
public void Require(GeneralTransformationRule rule)
Parameters
Type Name Description
GeneralTransformationRule rule

The transformation rule that should be required

Remarks

This version Always takes the input parameter as input for the dependent transformations. Thus, this method will throw an exception, if the types do not match

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