C# Class AsynqFramework.CodeWriter.CodeWriterBase

Afficher le fichier Open project: JamesDunne/Asynq

Protected Properties

Свойство Type Description
indentLevel int
output List

Méthodes publiques

Méthode Description
Clone ( ) : CodeWriterBase
CodeWriterBase ( ) : System
Format ( TextWriter tw, string indentString, int indentationLevel, string newLine ) : void

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 ( Type ty ) : void

Writes the name of a type to the output. It will be formatted as a C# primitive type name if applicable.

WriteValue ( Type vType, object value ) : void

Writes a C# constant value to the output.

WriteWhitespace ( string ws ) : void

Writes whitespace characters to the output.

Méthodes protégées

Méthode Description
CodeWriterBase ( int indentLevel, List tokens ) : System
InitializeWriter ( ) : void

Private Methods

Méthode Description
escapeCSharp ( string value ) : string

Method Details

Clone() public méthode

public Clone ( ) : CodeWriterBase
Résultat CodeWriterBase

CodeWriterBase() public méthode

public CodeWriterBase ( ) : System
Résultat System

CodeWriterBase() protected méthode

protected CodeWriterBase ( int indentLevel, List tokens ) : System
indentLevel int
tokens List
Résultat System

Format() public méthode

Formats the code as plain-text to a TextWriter with the specified indentation and new-line settings.
public Format ( TextWriter tw, string indentString, int indentationLevel, string newLine ) : void
tw System.IO.TextWriter 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.
Résultat void

Indent() public méthode

Increase the indentation level for the next line.
public Indent ( ) : void
Résultat void

InitializeWriter() protected méthode

protected InitializeWriter ( ) : void
Résultat void

Output() public méthode

public Output ( OutputToken tok ) : OutputToken
tok OutputToken
Résultat OutputToken

Output() public méthode

public Output ( string text ) : OutputToken
text string
Résultat OutputToken

Output() public méthode

public Output ( string text, TokenType type ) : OutputToken
text string
type TokenType
Résultat OutputToken

Output() public méthode

public Output ( string text, TokenType type, object state ) : OutputToken
text string
type TokenType
state object
Résultat OutputToken

OutputWithDepth() public méthode

public OutputWithDepth ( string text, TokenType type, int depth ) : OutputToken
text string
type TokenType
depth int
Résultat OutputToken

Reset() public méthode

public Reset ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

ToString() public méthode

public ToString ( string indentString, int indentationLevel, string newLine ) : string
indentString string
indentationLevel int
newLine string
Résultat string

Unindent() public méthode

Decrease the indentation level for the next line.
public Unindent ( ) : void
Résultat void

WriteComment() public méthode

Writes a C# comment to the output.
public WriteComment ( string cm ) : void
cm string Comment text, must be a // single line comment or be a /* block comment */ form.
Résultat void

WriteIdentifier() public méthode

Writes a C# identifier to the output.
public WriteIdentifier ( string id ) : void
id string
Résultat void

WriteKeyword() public méthode

Writes a C# keyword to the output.
public WriteKeyword ( string kw ) : void
kw string
Résultat void

WriteNewline() public méthode

Writes a new line to the output followed by the indentation string.
public WriteNewline ( ) : void
Résultat void

WriteOperator() public méthode

Writes operator characters to the output, such as parentheses and other non-alphanumeric/non-whitespace characters.
public WriteOperator ( string op ) : void
op string
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( byte value ) : void
value byte
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( char value ) : void
value char
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( decimal value ) : void
value decimal
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( double value ) : void
value double
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( float value ) : void
value float
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( int value ) : void
value int
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( long value ) : void
value long
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( sbyte value ) : void
value sbyte
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( short value ) : void
value short
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( string value ) : void
value string
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( uint value ) : void
value uint
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( ulong value ) : void
value ulong
Résultat void

WritePrimitive() public méthode

public WritePrimitive ( ushort value ) : void
value ushort
Résultat void

WriteType() public méthode

Writes the name of a type to the output. It will be formatted as a C# primitive type name if applicable.
public WriteType ( Type ty ) : void
ty System.Type
Résultat void

WriteValue() public méthode

Writes a C# constant value to the output.
public WriteValue ( Type vType, object value ) : void
vType System.Type
value object
Résultat void

WriteWhitespace() public méthode

Writes whitespace characters to the output.
public WriteWhitespace ( string ws ) : void
ws string
Résultat void

Property Details

indentLevel protected_oe property

protected int indentLevel
Résultat int

output protected_oe property

protected List output
Résultat List