C# 클래스 BACnet.SchemaCompiler.CodeGen.CSharpTypeGenerator.CSharpEmitter

상속: IDisposable
파일 보기 프로젝트 열기: LorenVS/bacstack

공개 메소드들

메소드 설명
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