Show / Hide Table of Contents

Class Meta2ClassesTransformation

The transformation to transform an NMeta metamodel to code

Inheritance
object
Transformation
ReflectiveTransformation
Meta2ClassesTransformation
Inherited Members
ReflectiveTransformation.CreateRules()
ReflectiveTransformation.GetRuleForRuleType(Type)
ReflectiveTransformation.Rule<TRule>()
ReflectiveTransformation.GetRulesForRuleType(Type)
ReflectiveTransformation.RegisterRules()
ReflectiveTransformation.CreateCustomRules()
ReflectiveTransformation.CreateDefaultRules()
Transformation.Patterns
Transformation.IsInitialized
Transformation.IsRulesRegistered
Transformation.CreateRulesInternal()
Transformation.CreateContext()
Transformation.Initialize()
Transformation.MaxOutputDelay
Transformation.MaxTransformationDelay
Transformation.ComputeInstantiatingTransformationRulePath(Computation)
Transformation.GetRulesForTypeSignature(Type[], Type)
Transformation.GetRulesExact(Type[], Type)
Transformation.GetRuleForTypeSignature(Type[], Type)
Transformation.GetRulesForInputTypes(params Type[])
Transformation.Rules
Transformation.GetRulesForTypeSignature(Type[], Type, bool)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public class Meta2ClassesTransformation : ReflectiveTransformation

Properties

| Edit this page View Source

DefaultNamespace

Gets or sets the default namespace for the generated code

Declaration
public string DefaultNamespace { get; set; }
Property Value
Type Description
string
Remarks

This value can only be set before the transformation is initialized

| Edit this page View Source

DefaultSystemImports

Gets the default imported system namespaces

Declaration
public static IEnumerable<string> DefaultSystemImports { get; }
Property Value
Type Description
IEnumerable<string>
| Edit this page View Source

ForceGeneration

Gets or sets a flag determing whether code should be generated regardless of existing code

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

GenerateChangedEvents

If set, for every property a corresponding event with suffix Changed is generated that gets fired when the property has changed

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

GenerateChangingEvents

If set, for every property a corresponding event with suffix Changing is generated that gets fired when the property is changing

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

GenerateCollectionsAsElements

If set, all collection properties are rendered as elements

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

GenerateForInputOnly

If set, the transformation only produces results for namespaces that have been explicitly been asked for

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

NamespaceMap

Gets the namespace assigned to a model URI

Declaration
public Dictionary<Uri, string> NamespaceMap { get; }
Property Value
Type Description
Dictionary<Uri, string>
| Edit this page View Source

OnlyNested

Gets or sets a value indicating whether only nested namespaces of an initial namespace should be in the code compile unit or all that are used

Declaration
public bool OnlyNested { get; set; }
Property Value
Type Description
bool
Remarks

This value can only be set before the transformation is initialized

| Edit this page View Source

SeparateImplementations

Gets or sets a value indicating whether to separate the class implementations, i.e. create a public interface or not

Declaration
public bool SeparateImplementations { get; set; }
Property Value
Type Description
bool
Remarks

This value can only be set before the transformation is initialized

| Edit this page View Source

SystemImports

Gets the imported system namespaces

Declaration
public virtual IEnumerable<string> SystemImports { get; }
Property Value
Type Description
IEnumerable<string>

Methods

| Edit this page View Source

AddToCompileUnit(INamespace)

Gets a value indicating whether the given namespace should be added to the compile unit

Declaration
protected virtual bool AddToCompileUnit(INamespace n)
Parameters
Type Name Description
INamespace n
Returns
Type Description
bool
| Edit this page View Source

CreateReference(IType, bool, ITransformationContext, bool)

Creates a reference to the given NMeta type

Declaration
protected static CodeTypeReference CreateReference(IType type, bool isReference, ITransformationContext context, bool implementation = false)
Parameters
Type Name Description
IType type

The NMeta type

bool isReference

A value indicating whether to default to IModelElement or object

ITransformationContext context

The transformation context

bool implementation

if true, a reference to the implementation is returned, otherwise a reference to the interface

Returns
Type Description
CodeTypeReference

A code type reference

| Edit this page View Source

GetResourceKey(Model)

Gets the resource key for the given model element

Declaration
protected virtual string GetResourceKey(Model model)
Parameters
Type Name Description
Model model

The model for which to generate a resource key

Returns
Type Description
string

The resource key of the model

| Edit this page View Source

IsValueType(IType)

Decides whether the given type is a value type

Declaration
protected virtual bool IsValueType(IType type)
Parameters
Type Name Description
IType type

The NMeta type

Returns
Type Description
bool

True, if the type is represented as a value type. Override for more specifics on primitives

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