Class Meta2ClassesTransformation.Attribute2Property
The transformation rule to transform attributes of a class or extension to a code property
Inheritance
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public class Meta2ClassesTransformation.Attribute2Property : TransformationRule<IAttribute, CodeMemberProperty>
Methods
| Edit this page View SourceCreateBagImplementationType(CodeTypeReference)
Creates the bag implementation of the given element type reference
Declaration
protected virtual CodeTypeReference CreateBagImplementationType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The type reference of the bags elements |
Returns
Type | Description |
---|---|
CodeTypeReference | A type reference for the bag implementation for the given element type |
CreateBagInterfaceType(CodeTypeReference)
Creates the bag interface type for the given element type
Declaration
protected virtual CodeTypeReference CreateBagInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type |
Returns
Type | Description |
---|---|
CodeTypeReference | The bag interface type reference, by default the generic ICollection |
CreateDefaultValue(IAttribute, CodeTypeReference, CodeMemberProperty)
Creates the default value for the property
Declaration
protected virtual CodeExpression CreateDefaultValue(IAttribute input, CodeTypeReference fieldType, CodeMemberProperty generatedProperty)
Parameters
Type | Name | Description |
---|---|---|
IAttribute | input | The input NMeta attribute |
CodeTypeReference | fieldType | The code type reference for the field type |
CodeMemberProperty | generatedProperty | The generated property |
Returns
Type | Description |
---|---|
CodeExpression | A code expression that represents the default value |
CreateListImplementationType(CodeTypeReference)
Creates the list implementation of the given element type reference
Declaration
protected virtual CodeTypeReference CreateListImplementationType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The type reference of the lists elements |
Returns
Type | Description |
---|---|
CodeTypeReference | A type reference for the list implementation for the given element type |
CreateListInterfaceType(CodeTypeReference)
Creates the list interface type for the given element type
Declaration
protected virtual CodeTypeReference CreateListInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type |
Returns
Type | Description |
---|---|
CodeTypeReference | The list interface type reference, by default the generic IList |
CreateOrderedSetImplementationType(CodeTypeReference)
Creates the ordered set implementation of the given element type reference
Declaration
protected virtual CodeTypeReference CreateOrderedSetImplementationType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The type reference of the elements |
Returns
Type | Description |
---|---|
CodeTypeReference | A type reference for the ordered set implementation for the given element type |
CreateOrderedSetInterfaceType(CodeTypeReference)
Creates the ordered set interface type for the given element type
Declaration
protected virtual CodeTypeReference CreateOrderedSetInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
Returns
Type | Description |
---|---|
CodeTypeReference | The ordered set interface type, by default the generic IOrderedSet interface from NMF.Collections.Generic |
CreateOutput(IAttribute, ITransformationContext)
Creates the output of this transformation rule
Declaration
public override CodeMemberProperty CreateOutput(IAttribute input, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IAttribute | input | The input of the transformation rule |
ITransformationContext | context | The context (and trace!) object |
Returns
Type | Description |
---|---|
CodeMemberProperty | The output for this transformation under this input |
Overrides
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
CreateSetImplementationType(CodeTypeReference)
Creates the unordered set implementation of the given element type reference
Declaration
protected virtual CodeTypeReference CreateSetImplementationType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The elements type reference |
Returns
Type | Description |
---|---|
CodeTypeReference | A type reference for the unordered set implementation for the given element type |
CreateSetInterfaceType(CodeTypeReference)
Creates the unordered set interface type for the given element type
Declaration
protected virtual CodeTypeReference CreateSetInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
Returns
Type | Description |
---|---|
CodeTypeReference | The unordered set interface type, by default the generic ISet |
RegisterDependencies()
Registers the dependency to generate refibed attributes
Declaration
public override void RegisterDependencies()
Overrides
| Edit this page View SourceTransform(IAttribute, CodeMemberProperty, ITransformationContext)
Initializes the generated property
Declaration
public override void Transform(IAttribute input, CodeMemberProperty generatedProperty, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IAttribute | input | The input NMeta attribute |
CodeMemberProperty | generatedProperty | The generated property |
ITransformationContext | context | The transformation context |