Class MetaFacade
Denotes a facade for the code generator
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public static class MetaFacade
Methods
| Edit this page View SourceCreateCode(INamespace, string)
Generates the code for the given namespace
Declaration
public static CodeCompileUnit CreateCode(INamespace ns, string overAllNamespace)
Parameters
Type | Name | Description |
---|---|---|
INamespace | ns | the namespace for which code should be generated |
string | overAllNamespace | The namespace that should be prepended to the generated code |
Returns
Type | Description |
---|---|
CodeCompileUnit | A compilation unit with the generated code |
GenerateCode(CodeCompileUnit, CodeDomProvider, string, bool)
Generates code for the given unit with the given code provider
Declaration
public static void GenerateCode(CodeCompileUnit unit, CodeDomProvider generator, string target, bool splitToFolders)
Parameters
Type | Name | Description |
---|---|---|
CodeCompileUnit | unit | The code compile unit |
CodeDomProvider | generator | The code provider |
string | target | The target path |
bool | splitToFolders | True, if the unit should be split up in one class per file, otherwise false |
SplitCompileUnit(CodeCompileUnit)
Splits the provided code compile unit into chunks such that it contains one class per file
Declaration
public static IDictionary<string, CodeCompileUnit> SplitCompileUnit(CodeCompileUnit unit)
Parameters
Type | Name | Description |
---|---|---|
CodeCompileUnit | unit | The unit containing all the code |
Returns
Type | Description |
---|---|
IDictionary<string, CodeCompileUnit> | A dictionary of paths and code compile units |