C# Класс AsynqFramework.CodeWriter.CodeWriterBase

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
indentLevel int
output List

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

Метод Описание
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.

Защищенные методы

Метод Описание
CodeWriterBase ( int indentLevel, List tokens ) : System
InitializeWriter ( ) : void

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

Метод Описание
escapeCSharp ( string value ) : string

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

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

public Clone ( ) : CodeWriterBase
Результат CodeWriterBase

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

public CodeWriterBase ( ) : System
Результат System

CodeWriterBase() защищенный Метод

protected CodeWriterBase ( int indentLevel, List tokens ) : System
indentLevel int
tokens List
Результат System

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

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.
Результат void

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

Increase the indentation level for the next line.
public Indent ( ) : void
Результат void

InitializeWriter() защищенный Метод

protected InitializeWriter ( ) : void
Результат void

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

public Output ( OutputToken tok ) : OutputToken
tok OutputToken
Результат OutputToken

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

public Output ( string text ) : OutputToken
text string
Результат OutputToken

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

public Output ( string text, TokenType type ) : OutputToken
text string
type TokenType
Результат OutputToken

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

public Output ( string text, TokenType type, object state ) : OutputToken
text string
type TokenType
state object
Результат OutputToken

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

public OutputWithDepth ( string text, TokenType type, int depth ) : OutputToken
text string
type TokenType
depth int
Результат OutputToken

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

public Reset ( ) : void
Результат void

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

public ToString ( ) : string
Результат string

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

public ToString ( string indentString, int indentationLevel, string newLine ) : string
indentString string
indentationLevel int
newLine string
Результат string

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

Decrease the indentation level for the next line.
public Unindent ( ) : void
Результат void

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

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.
Результат void

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

Writes a C# identifier to the output.
public WriteIdentifier ( string id ) : void
id string
Результат void

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

Writes a C# keyword to the output.
public WriteKeyword ( string kw ) : void
kw string
Результат void

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

Writes a new line to the output followed by the indentation string.
public WriteNewline ( ) : void
Результат void

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

Writes operator characters to the output, such as parentheses and other non-alphanumeric/non-whitespace characters.
public WriteOperator ( string op ) : void
op string
Результат void

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

public WritePrimitive ( byte value ) : void
value byte
Результат void

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

public WritePrimitive ( char value ) : void
value char
Результат void

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

public WritePrimitive ( decimal value ) : void
value decimal
Результат void

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

public WritePrimitive ( double value ) : void
value double
Результат void

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

public WritePrimitive ( float value ) : void
value float
Результат void

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

public WritePrimitive ( int value ) : void
value int
Результат void

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

public WritePrimitive ( long value ) : void
value long
Результат void

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

public WritePrimitive ( sbyte value ) : void
value sbyte
Результат void

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

public WritePrimitive ( short value ) : void
value short
Результат void

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

public WritePrimitive ( string value ) : void
value string
Результат void

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

public WritePrimitive ( uint value ) : void
value uint
Результат void

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

public WritePrimitive ( ulong value ) : void
value ulong
Результат void

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

public WritePrimitive ( ushort value ) : void
value ushort
Результат void

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

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
Результат void

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

Writes a C# constant value to the output.
public WriteValue ( Type vType, object value ) : void
vType System.Type
value object
Результат void

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

Writes whitespace characters to the output.
public WriteWhitespace ( string ws ) : void
ws string
Результат void

Описание свойств

indentLevel защищенное свойство

protected int indentLevel
Результат int

output защищенное свойство

protected List output
Результат List