C# Класс BACnet.SchemaCompiler.CodeGen.CSharpTypeGenerator.CSharpEmitter

Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
AbstractProperty ( string name, string type, Access access = Access.Public ) : void

Creates a new abstract property

Break ( ) : void

Generates a break

CSharpEmitter ( string path ) : System

Constructs a new csharp emitter

Case ( string expression ) : void

Generates a case

Class ( string name, bool isAbstract = false, string bases = null, Access access = Access.Public ) : CSharpEmitter

Enters a class

Constructor ( string name, Parameter parameters, Access access = Access.Public, bool deferDefault = false ) : CSharpEmitter

Enters a new constructor

Default ( ) : void

Enters a default case

Dispose ( ) : void

Disposes of the emitter

EmitUsing ( string ns ) : void

Emits a using clause

Enum ( string name, string baseType = "uint" ) : CSharpEmitter

Enters an enum

EnumValue ( string name, int value, bool last = false ) : void

Generates an enumeration value

IndentString ( int modifier ) : string

Retrieves the current indentation string

Namespace ( string ns ) : CSharpEmitter

Enters a namespace

OverrideProperty ( string name, string type, string body, Access access = Access.Public ) : void

Overrides a get-only property

Property ( string name, string type, Access access = Access.Public, Access setter = Access.Private ) : void

Creates a new property

Property ( string name, string type, string body, Access access = Access.Public ) : void

Creates a new get-only property

StaticMethod ( string name, string returnType, Parameter parameters, Access access = Access.Public, bool @new = false ) : CSharpEmitter

Enters a new static method

StaticReadonlyField ( string name, string type, string initializer, Access access = Access.Public, bool @new = false ) : void

Creates a static readonly field

Struct ( string name, Access access = Access.Public ) : CSharpEmitter

Enters a struct

Switch ( string expression ) : CSharpEmitter

Enters a switch

WriteLine ( ) : void

Writes a blank line

WriteLine ( string fmt ) : void

Writes a single line to the stream

WriteLineRaw ( string text ) : void

Writes a single line of raw text to the stream

Приватные методы

Метод Описание
CSharpEmitter ( StreamWriter writer, int indent ) : System

Constructs a scoped emitter

_newScope ( ) : CSharpEmitter

Creates a new child scope emitter

Описание методов

AbstractProperty() публичный Метод

Creates a new abstract property
public AbstractProperty ( string name, string type, Access access = Access.Public ) : void
name string The name of the property
type string The type of the property
access Access The access specifier for the property
Результат void

Break() публичный Метод

Generates a break
public Break ( ) : void
Результат void

CSharpEmitter() публичный Метод

Constructs a new csharp emitter
public CSharpEmitter ( string path ) : System
path string
Результат System

Case() публичный Метод

Generates a case
public Case ( string expression ) : void
expression string The case expression
Результат void

Class() публичный Метод

Enters a class
public Class ( string name, bool isAbstract = false, string bases = null, Access access = Access.Public ) : CSharpEmitter
name string The name of the class
isAbstract bool
bases string The base types
access Access
Результат CSharpEmitter

Constructor() публичный Метод

Enters a new constructor
public Constructor ( string name, Parameter parameters, Access access = Access.Public, bool deferDefault = false ) : CSharpEmitter
name string The type name
parameters Parameter The constructor parameters
access Access
deferDefault bool
Результат CSharpEmitter

Default() публичный Метод

Enters a default case
public Default ( ) : void
Результат void

Dispose() публичный Метод

Disposes of the emitter
public Dispose ( ) : void
Результат void

EmitUsing() публичный Метод

Emits a using clause
public EmitUsing ( string ns ) : void
ns string The namespace
Результат void

Enum() публичный Метод

Enters an enum
public Enum ( string name, string baseType = "uint" ) : CSharpEmitter
name string The name of the enum
baseType string The base type
Результат CSharpEmitter

EnumValue() публичный Метод

Generates an enumeration value
public EnumValue ( string name, int value, bool last = false ) : void
name string The name of the value
value int The value
last bool
Результат void

IndentString() публичный Метод

Retrieves the current indentation string
public IndentString ( int modifier ) : string
modifier int The modifier to apply to the indentation level
Результат string

Namespace() публичный Метод

Enters a namespace
public Namespace ( string ns ) : CSharpEmitter
ns string The namespace
Результат CSharpEmitter

OverrideProperty() публичный Метод

Overrides a get-only property
public OverrideProperty ( string name, string type, string body, Access access = Access.Public ) : void
name string The name of the property
type string The type of the property
body string The body of the property accessor
access Access The access level of the property
Результат void

Property() публичный Метод

Creates a new property
public Property ( string name, string type, Access access = Access.Public, Access setter = Access.Private ) : void
name string The name of the property
type string The type of the property
access Access The access specifier for the property
setter Access The setter specifier for the property
Результат void

Property() публичный Метод

Creates a new get-only property
public Property ( string name, string type, string body, Access access = Access.Public ) : void
name string The name of the property
type string The type of the property
body string The body of the property
access Access The access specifier for the property
Результат void

StaticMethod() публичный Метод

Enters a new static method
public StaticMethod ( string name, string returnType, Parameter parameters, Access access = Access.Public, bool @new = false ) : CSharpEmitter
name string The name of the method
returnType string The return type of the method
parameters Parameter The parameters of the method
access Access The access specifier of the method
@new bool
Результат CSharpEmitter

StaticReadonlyField() публичный Метод

Creates a static readonly field
public StaticReadonlyField ( string name, string type, string initializer, Access access = Access.Public, bool @new = false ) : void
name string The name of the field
type string The type of the field
initializer string
access Access The access specifier for the field
@new bool
Результат void

Struct() публичный Метод

Enters a struct
public Struct ( string name, Access access = Access.Public ) : CSharpEmitter
name string The name of the struct
access Access The access specifier for the struct
Результат CSharpEmitter

Switch() публичный Метод

Enters a switch
public Switch ( string expression ) : CSharpEmitter
expression string The expression to switch on
Результат CSharpEmitter

WriteLine() публичный Метод

Writes a blank line
public WriteLine ( ) : void
Результат void

WriteLine() публичный Метод

Writes a single line to the stream
public WriteLine ( string fmt ) : void
fmt string The format string
Результат void

WriteLineRaw() публичный Метод

Writes a single line of raw text to the stream
public WriteLineRaw ( string text ) : void
text string The text to write
Результат void