Property | Type | Description | |
---|---|---|---|
indentLevel | int | ||
output | List |
Method | Description | |
---|---|---|
Clone ( ) : |
||
CodeWriterBase ( ) : System | ||
Format ( |
Formats the code as plain-text to a TextWriter with the specified indentation and new-line settings.
|
|
Indent ( ) : void |
Increase the indentation level for the next line.
|
|
Output ( OutputToken tok ) : OutputToken | ||
Output ( string text ) : OutputToken | ||
Output ( string text, TokenType type ) : OutputToken | ||
Output ( string text, TokenType type, object state ) : OutputToken | ||
OutputWithDepth ( string text, TokenType type, int depth ) : OutputToken | ||
Reset ( ) : void | ||
ToString ( ) : string | ||
ToString ( string indentString, int indentationLevel, string newLine ) : string | ||
Unindent ( ) : void |
Decrease the indentation level for the next line.
|
|
WriteComment ( string cm ) : void |
Writes a C# comment to the output.
|
|
WriteIdentifier ( string id ) : void |
Writes a C# identifier to the output.
|
|
WriteKeyword ( string kw ) : void |
Writes a C# keyword to the output.
|
|
WriteNewline ( ) : void |
Writes a new line to the output followed by the indentation string.
|
|
WriteOperator ( string op ) : void |
Writes operator characters to the output, such as parentheses and other non-alphanumeric/non-whitespace characters.
|
|
WritePrimitive ( byte value ) : void | ||
WritePrimitive ( char value ) : void | ||
WritePrimitive ( decimal value ) : void | ||
WritePrimitive ( double value ) : void | ||
WritePrimitive ( float value ) : void | ||
WritePrimitive ( int value ) : void | ||
WritePrimitive ( long value ) : void | ||
WritePrimitive ( sbyte value ) : void | ||
WritePrimitive ( short value ) : void | ||
WritePrimitive ( string value ) : void | ||
WritePrimitive ( uint value ) : void | ||
WritePrimitive ( ulong value ) : void | ||
WritePrimitive ( ushort value ) : void | ||
WriteType ( |
Writes the name of a type to the output. It will be formatted as a C# primitive type name if applicable.
|
|
WriteValue ( |
Writes a C# constant value to the output.
|
|
WriteWhitespace ( string ws ) : void |
Writes whitespace characters to the output.
|
Method | Description | |
---|---|---|
CodeWriterBase ( int indentLevel, List |
||
InitializeWriter ( ) : void |
Method | Description | |
---|---|---|
escapeCSharp ( string value ) : string |
protected CodeWriterBase ( int indentLevel, List |
||
indentLevel | int | |
tokens | List |
|
return | System |
public Format ( |
||
tw | TextWriter to write the output to | |
indentString | string | The indentation string to use per each level of indentation, defaults to 4 spaces. |
indentationLevel | int | The level of indentation to start at, defaults to 0. |
newLine | string | The environment-specific new-line delimiter string to use, defaults to Environment.NewLine. |
return | void |
public Output ( OutputToken tok ) : OutputToken | ||
tok | OutputToken | |
return | OutputToken |
public Output ( string text, TokenType type ) : OutputToken | ||
text | string | |
type | TokenType | |
return | OutputToken |
public Output ( string text, TokenType type, object state ) : OutputToken | ||
text | string | |
type | TokenType | |
state | object | |
return | OutputToken |
public OutputWithDepth ( string text, TokenType type, int depth ) : OutputToken | ||
text | string | |
type | TokenType | |
depth | int | |
return | OutputToken |
public ToString ( string indentString, int indentationLevel, string newLine ) : string | ||
indentString | string | |
indentationLevel | int | |
newLine | string | |
return | string |
public WriteComment ( string cm ) : void | ||
cm | string | Comment text, must be a // single line comment or be a /* block comment */ form. |
return | void |
public WritePrimitive ( decimal value ) : void | ||
value | decimal | |
return | void |
public WritePrimitive ( double value ) : void | ||
value | double | |
return | void |
public WritePrimitive ( string value ) : void | ||
value | string | |
return | void |
public WritePrimitive ( ushort value ) : void | ||
value | ushort | |
return | void |
public WriteValue ( |
||
vType | ||
value | object | |
return | void |