Table of Contents

Class Meta2ClassesTransformation.Reference2Property

Namespace
NMF.Models.Meta
Assembly
NMF.Models.MetaTransformation.dll

The transformation rule to transform a reference to a code property

public class Meta2ClassesTransformation.Reference2Property : TransformationRule<IReference, CodeMemberProperty>
Inheritance
Meta2ClassesTransformation.Reference2Property
Inherited Members

Methods

CreateBag(CodeTypeReference, bool)

Creates the type reference for a bag with the given element type

protected virtual CodeTypeReference CreateBag(CodeTypeReference elementTypeReference, bool isContainment)

Parameters

elementTypeReference CodeTypeReference

The element type reference

isContainment bool

Indicates whether the reference is a containment

Returns

CodeTypeReference

A code reference to the class that implements the collection

CreateBagInterfaceType(CodeTypeReference)

Creates the interface type for a bag with the given element type

protected virtual CodeTypeReference CreateBagInterfaceType(CodeTypeReference elementTypeReference)

Parameters

elementTypeReference CodeTypeReference

Returns

CodeTypeReference

CreateList(CodeTypeReference, bool)

Creates the type reference for a list with the given element type

protected virtual CodeTypeReference CreateList(CodeTypeReference elementTypeReference, bool isContainment)

Parameters

elementTypeReference CodeTypeReference

The element type reference

isContainment bool

Indicates whether the reference is a containment

Returns

CodeTypeReference

A code reference to the class that implements the collection

CreateListInterfaceType(CodeTypeReference)

Creates the interface type for a list with the given element type

protected virtual CodeTypeReference CreateListInterfaceType(CodeTypeReference elementTypeReference)

Parameters

elementTypeReference CodeTypeReference

The element type reference

Returns

CodeTypeReference

A code type reference that represents a list with the given elements

CreateOrderedSet(CodeTypeReference, bool)

Creates the type reference for an ordered set with the given element type

protected virtual CodeTypeReference CreateOrderedSet(CodeTypeReference elementTypeReference, bool isContainment)

Parameters

elementTypeReference CodeTypeReference

The element type reference

isContainment bool

Indicates whether the reference is a containment

Returns

CodeTypeReference

A code type reference to the class that implements the collection

CreateOrderedSetInterfaceType(CodeTypeReference)

Creates the interface type for an ordered set with the given element type

protected virtual CodeTypeReference CreateOrderedSetInterfaceType(CodeTypeReference elementTypeReference)

Parameters

elementTypeReference CodeTypeReference

The element tye reference

Returns

CodeTypeReference

A code type reference that represents an ordered set

CreateOutput(IReference, ITransformationContext)

Creates the output of this transformation rule

public override CodeMemberProperty CreateOutput(IReference input, ITransformationContext context)

Parameters

input IReference

The input of the transformation rule

context ITransformationContext

The context (and trace!) object

Returns

CodeMemberProperty

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

CreateSet(CodeTypeReference, bool)

Creates the type reference for an unordered set with the given element type

protected virtual CodeTypeReference CreateSet(CodeTypeReference elementTypeReference, bool isContainment)

Parameters

elementTypeReference CodeTypeReference

The element type reference

isContainment bool

Indicates whether the reference is a containment

Returns

CodeTypeReference

A code type reference to the class that implements the collection

CreateSetInterfaceType(CodeTypeReference)

Creates the interface type for an unordered set with the given element type

protected virtual CodeTypeReference CreateSetInterfaceType(CodeTypeReference elementTypeReference)

Parameters

elementTypeReference CodeTypeReference

The element type reference

Returns

CodeTypeReference

A code type reference that represents an unordered set with the given elements

GenerateSetStatement(IReference, CodeMemberProperty, CodeExpression, ITransformationContext)

Generates the set statements of a normal reference

protected virtual void GenerateSetStatement(IReference property, CodeMemberProperty codeProperty, CodeExpression fieldReference, ITransformationContext context)

Parameters

property IReference

The NMeta reference

codeProperty CodeMemberProperty

The generated code property

fieldReference CodeExpression

A reference to the backening field

context ITransformationContext

The context in which the reference is generated

Remarks

Normal means in this case that the reference is not an overridden container reference

RegisterDependencies()

Registers the dependencies, i.e. transform the reference type and refined references

public override void RegisterDependencies()

Transform(IReference, CodeMemberProperty, ITransformationContext)

Initializes the generated property

public override void Transform(IReference input, CodeMemberProperty generatedProperty, ITransformationContext context)

Parameters

input IReference

The NMeta reference

generatedProperty CodeMemberProperty

The generated property

context ITransformationContext

The transformation context