Class CodeGenerator
Generates code for serilaizer and deserializer
Inheritance
System.Object
CodeGenerator
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
public class CodeGenerator : DisposableObject, IDisposable
Properties
CodeSegregation
Declaration
[Config]
public CodeGenerator.GeneratedCodeSegregation CodeSegregation { get; set; }
Property Value
RootPath
Declaration
[Config]
public string RootPath { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
DoGenerate(Assembly)
Declaration
protected virtual void DoGenerate(Assembly asm)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
asm |
|
EmitDeserialize(StringBuilder, Schema)
Declaration
protected virtual void EmitDeserialize(StringBuilder source, Schema schema)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Schema |
schema |
|
EmitDeserializeBody(StringBuilder, Schema)
Declaration
protected virtual void EmitDeserializeBody(StringBuilder source, Schema schema)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Schema |
schema |
|
EmitDeserializeField(StringBuilder, Schema.FieldDef)
Declaration
protected virtual void EmitDeserializeField(StringBuilder source, Schema.FieldDef fdef)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Schema.FieldDef |
fdef |
|
Declaration
protected virtual void EmitFileFooter(StringBuilder source)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Declaration
protected virtual void EmitFileHeader(StringBuilder source)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
EmitITypeSerializationCore(StringBuilder, Type)
Declaration
protected virtual void EmitITypeSerializationCore(StringBuilder source, Type tDoc)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
System.Type |
tDoc |
|
Declaration
protected virtual void EmitNamespaceFooter(StringBuilder source)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Declaration
protected virtual void EmitNamespaceHeader(StringBuilder source, string ns)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
System.String |
ns |
|
EmitSerialize(StringBuilder, Schema)
Declaration
protected virtual void EmitSerialize(StringBuilder source, Schema schema)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Schema |
schema |
|
EmitSerializeBody(StringBuilder, Schema)
Declaration
protected virtual void EmitSerializeBody(StringBuilder source, Schema schema)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Schema |
schema |
|
EmitSerializeFieldLine(StringBuilder, Schema.FieldDef)
Declaration
protected virtual void EmitSerializeFieldLine(StringBuilder source, Schema.FieldDef fdef)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
source |
|
Schema.FieldDef |
fdef |
|
Generate(Assembly)
Declaration
public void Generate(Assembly asm)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
asm |
|
GetName(String)
Converts backend name of up to 8 ASCII chars in length
Declaration
public static ulong GetName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.UInt64 |
|
GetName(UInt64)
Converts backend name of up to 8 ASCII chars in length
Declaration
public static string GetName(ulong name)
Parameters
Type |
Name |
Description |
System.UInt64 |
name |
|
Returns
Type |
Description |
System.String |
|
GetRowTypes(Assembly)
Declaration
protected virtual IEnumerable<Type> GetRowTypes(Assembly asm)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
asm |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
WriteContent(String, String, StringBuilder)
Declaration
protected virtual void WriteContent(string ns, string name, StringBuilder content)
Parameters
Type |
Name |
Description |
System.String |
ns |
|
System.String |
name |
|
System.Text.StringBuilder |
content |
|
Implements
System.IDisposable
Extension Methods