Class Meta2ClassesTransformation.Enumeration2Type
The transformation rule to generate enumerations from NMeta enumerations
Inheritance
Meta2ClassesTransformation.Enumeration2Type
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public class Meta2ClassesTransformation.Enumeration2Type : EnumGenerator<IEnumeration>
Methods
| Edit this page View SourceGetIsFlagged(IEnumeration)
Gets a value indicating whether the generated enumeration is flagged
Declaration
protected override bool GetIsFlagged(IEnumeration input)
Parameters
Type | Name | Description |
---|---|---|
IEnumeration | input | The NMeta enumeration |
Returns
Type | Description |
---|---|
bool | True, if the enumeration is flagged, otherwise false |
Overrides
| Edit this page View SourceGetMembers(IEnumeration, CodeTypeDeclaration, ITransformationContext)
Gets the enumeration members that should be generated based on the given NMeta enumeration
Declaration
protected override IEnumerable<EnumGenerator<IEnumeration>.EnumMember> GetMembers(IEnumeration input, CodeTypeDeclaration generatedType, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IEnumeration | input | The NMeta enumeration |
CodeTypeDeclaration | generatedType | The generated type |
ITransformationContext | context | The context in which the enumeration is generated |
Returns
Type | Description |
---|---|
IEnumerable<EnumGenerator<IEnumeration>.EnumMember> | A collection of enumeration members |
Overrides
| Edit this page View SourceGetName(IEnumeration)
Gets the name of the enumeration
Declaration
protected override string GetName(IEnumeration input)
Parameters
Type | Name | Description |
---|---|---|
IEnumeration | input | The NMeta enumeration |
Returns
Type | Description |
---|---|
string | The name of the enumeration to be generated |
Overrides
| Edit this page View SourceRegisterDependencies()
Marks the transformation rule instantiating for Type2Type
Declaration
public override void RegisterDependencies()
Overrides
| Edit this page View SourceTransform(IEnumeration, CodeTypeDeclaration, ITransformationContext)
Initializes the created enumeration
Declaration
public override void Transform(IEnumeration input, CodeTypeDeclaration output, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IEnumeration | input | The input NMeta enumeration |
CodeTypeDeclaration | output | The generated code declaration |
ITransformationContext | context | The transformation context |