C# Class SilentOrbit.Code.CodeWriter

Static and instance helpers for code generation
Inheritance: IDisposable
Afficher le fichier Open project: hultqvist/protobuf

Méthodes publiques

Свойство Type Description
DefaultIndentPrefix string
DefaultNewLine string
IndentPrefix string
NewLine string

Méthodes publiques

Méthode Description
Attribute ( string attributeConstructor ) : void
Bracket ( ) : void

Write leading bracket and indent

Bracket ( string str ) : void

Write leading bracket and indent

Case ( int id ) : void
Case ( string str ) : void
CaseDefault ( ) : void
CodeWriter ( ) : System

Writes to memory, get the code using the "Code" property

CodeWriter ( string csPath ) : System

Writes code directly to file

Comment ( string code ) : void
Dedent ( ) : void
Dispose ( ) : void
ElseBracket ( ) : void

Close a previous IfBracket and start an else

ElseIfBracket ( string str ) : void

Close a previous Bracket and start an "else if"

EndBracket ( ) : void
EndBracketSpace ( ) : void
Flush ( ) : void
ForeachBracket ( string str ) : void
IfBracket ( string str ) : void
Indent ( ) : void
Summary ( string summary ) : void
SummaryParam ( string name, string description ) : void

Switch ( string str ) : void
SwitchEnd ( ) : void
Using ( string str ) : void
WhileBracket ( string str ) : void
WriteIndent ( string str ) : void

Writes a singe line indented.

WriteLine ( ) : void
WriteLine ( string line ) : void
WritePragma ( string line ) : void

Private Methods

Méthode Description
SplitTrimEnd ( string text ) : string[]

Split string into an array of lines and trim whitespace at the end

Method Details

Attribute() public méthode

public Attribute ( string attributeConstructor ) : void
attributeConstructor string
Résultat void

Bracket() public méthode

Write leading bracket and indent
public Bracket ( ) : void
Résultat void

Bracket() public méthode

Write leading bracket and indent
public Bracket ( string str ) : void
str string Line before bracket
Résultat void

Case() public méthode

public Case ( int id ) : void
id int
Résultat void

Case() public méthode

public Case ( string str ) : void
str string
Résultat void

CaseDefault() public méthode

public CaseDefault ( ) : void
Résultat void

CodeWriter() public méthode

Writes to memory, get the code using the "Code" property
public CodeWriter ( ) : System
Résultat System

CodeWriter() public méthode

Writes code directly to file
public CodeWriter ( string csPath ) : System
csPath string
Résultat System

Comment() public méthode

public Comment ( string code ) : void
code string
Résultat void

Dedent() public méthode

public Dedent ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ElseBracket() public méthode

Close a previous IfBracket and start an else
public ElseBracket ( ) : void
Résultat void

ElseIfBracket() public méthode

Close a previous Bracket and start an "else if"
public ElseIfBracket ( string str ) : void
str string
Résultat void

EndBracket() public méthode

public EndBracket ( ) : void
Résultat void

EndBracketSpace() public méthode

public EndBracketSpace ( ) : void
Résultat void

Flush() public méthode

public Flush ( ) : void
Résultat void

ForeachBracket() public méthode

public ForeachBracket ( string str ) : void
str string
Résultat void

IfBracket() public méthode

public IfBracket ( string str ) : void
str string
Résultat void

Indent() public méthode

public Indent ( ) : void
Résultat void

Summary() public méthode

public Summary ( string summary ) : void
summary string
Résultat void

SummaryParam() public méthode

public SummaryParam ( string name, string description ) : void
name string
description string
Résultat void

Switch() public méthode

public Switch ( string str ) : void
str string
Résultat void

SwitchEnd() public méthode

public SwitchEnd ( ) : void
Résultat void

Using() public méthode

public Using ( string str ) : void
str string
Résultat void

WhileBracket() public méthode

public WhileBracket ( string str ) : void
str string
Résultat void

WriteIndent() public méthode

Writes a singe line indented.
public WriteIndent ( string str ) : void
str string
Résultat void

WriteLine() public méthode

public WriteLine ( ) : void
Résultat void

WriteLine() public méthode

public WriteLine ( string line ) : void
line string
Résultat void

WritePragma() public méthode

public WritePragma ( string line ) : void
line string
Résultat void

Property Details

DefaultIndentPrefix public_oe static_oe property

public static string DefaultIndentPrefix
Résultat string

DefaultNewLine public_oe static_oe property

public static string DefaultNewLine
Résultat string

IndentPrefix public_oe property

public string IndentPrefix
Résultat string

NewLine public_oe property

public string NewLine
Résultat string