Class Meta2ClassesTransformation.Extension2Type
The transformation rule to generate the class to represent an extension
Inheritance
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public class Meta2ClassesTransformation.Extension2Type : ClassGenerator<IExtension>
Methods
| Edit this page View SourceCreateFromMethod(IExtension, CodeTypeDeclaration, ITransformationContext)
Generates the static From method, extracting the extension from a given model element
Declaration
protected virtual void CreateFromMethod(IExtension input, CodeTypeDeclaration generatedType, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IExtension | input | The NMeta extension |
CodeTypeDeclaration | generatedType | The generated type declaration for the given extension |
ITransformationContext | context | The transformation context |
CreateGetExtension(IExtension, CodeTypeDeclaration, ITransformationContext)
Creates a method to return the extension type of the current instance
Declaration
protected virtual void CreateGetExtension(IExtension extension, CodeTypeDeclaration generatedType, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IExtension | extension | The extension |
CodeTypeDeclaration | generatedType | The type generated for the given extension |
ITransformationContext | context | The transformation context in which the code is generated |
GetName(IExtension)
Gets the name of the generated extension
Declaration
protected override string GetName(IExtension input)
Parameters
Type | Name | Description |
---|---|---|
IExtension | input | The input NMeta extension |
Returns
Type | Description |
---|---|
string | The name of the generated extension |
Overrides
| Edit this page View SourceRegisterDependencies()
Registers the dependencies, i.e. marks the transformation rule instantiating for Type2Type and requires the transformation of the members
Declaration
public override void RegisterDependencies()
Overrides
| Edit this page View SourceTransform(IExtension, CodeTypeDeclaration, ITransformationContext)
Initializes the generated type for the NMeta extension
Declaration
public override void Transform(IExtension input, CodeTypeDeclaration generatedType, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IExtension | input | The NMeta extension |
CodeTypeDeclaration | generatedType | The generated type for the extension |
ITransformationContext | context | The transformation context |