C# Class ICSharpCode.NRefactory.CSharp.TextWriterTokenWriter

Writes C# code into a TextWriter.
Inheritance: TokenWriter, ILocatable
Mostra file Open project: 0xd4d/NRefactory Class Usage Examples

Public Methods

Method Description
ConvertCharLiteral ( char ch ) : string

Gets the escape sequence for the specified character within a char literal. Does not include the single quotes surrounding the char literal.

ConvertString ( string str ) : string

Converts special characters to escape sequences within the given string.

EndNode ( AstNode node ) : void
Indent ( ) : void
NewLine ( ) : void
PrintPrimitiveValue ( object value ) : string
Space ( ) : void
StartNode ( AstNode node ) : void
TextWriterTokenWriter ( TextWriter textWriter ) : System
Unindent ( ) : void
WriteComment ( CommentType commentType, string content, CommentReference refs ) : void
WriteIdentifier ( Identifier identifier, object data ) : void
WriteKeyword ( ICSharpCode.NRefactory.CSharp.Role role, string keyword ) : void
WritePreProcessorDirective ( PreProcessorDirectiveType type, string argument ) : void
WritePrimitiveType ( string type ) : void
WritePrimitiveValue ( object value, object data = null, string literalValue = null ) : void
WritePrimitiveValue ( object value, object data, string literalValue, int &column, object>.Action writer, Action writeToken ) : void
WriteToken ( ICSharpCode.NRefactory.CSharp.Role role, string token, object data ) : void

Protected Methods

Method Description
WriteIndentation ( ) : void

Private Methods

Method Description
AppendChar ( StringBuilder sb, char ch ) : void
ConvertChar ( char ch ) : string

Gets the escape sequence for the specified character.

This method does not convert ' or ".

UpdateEndLocation ( string content, int &line, int &column ) : void

Method Details

ConvertCharLiteral() public static method

Gets the escape sequence for the specified character within a char literal. Does not include the single quotes surrounding the char literal.
public static ConvertCharLiteral ( char ch ) : string
ch char
return string

ConvertString() public static method

Converts special characters to escape sequences within the given string.
public static ConvertString ( string str ) : string
str string
return string

EndNode() public method

public EndNode ( AstNode node ) : void
node AstNode
return void

Indent() public method

public Indent ( ) : void
return void

NewLine() public method

public NewLine ( ) : void
return void

PrintPrimitiveValue() public static method

public static PrintPrimitiveValue ( object value ) : string
value object
return string

Space() public method

public Space ( ) : void
return void

StartNode() public method

public StartNode ( AstNode node ) : void
node AstNode
return void

TextWriterTokenWriter() public method

public TextWriterTokenWriter ( TextWriter textWriter ) : System
textWriter System.IO.TextWriter
return System

Unindent() public method

public Unindent ( ) : void
return void

WriteComment() public method

public WriteComment ( CommentType commentType, string content, CommentReference refs ) : void
commentType CommentType
content string
refs CommentReference
return void

WriteIdentifier() public method

public WriteIdentifier ( Identifier identifier, object data ) : void
identifier Identifier
data object
return void

WriteIndentation() protected method

protected WriteIndentation ( ) : void
return void

WriteKeyword() public method

public WriteKeyword ( ICSharpCode.NRefactory.CSharp.Role role, string keyword ) : void
role ICSharpCode.NRefactory.CSharp.Role
keyword string
return void

WritePreProcessorDirective() public method

public WritePreProcessorDirective ( PreProcessorDirectiveType type, string argument ) : void
type PreProcessorDirectiveType
argument string
return void

WritePrimitiveType() public method

public WritePrimitiveType ( string type ) : void
type string
return void

WritePrimitiveValue() public method

public WritePrimitiveValue ( object value, object data = null, string literalValue = null ) : void
value object
data object
literalValue string
return void

WritePrimitiveValue() public static method

public static WritePrimitiveValue ( object value, object data, string literalValue, int &column, object>.Action writer, Action writeToken ) : void
value object
data object
literalValue string
column int
writer object>.Action
writeToken Action
return void

WriteToken() public method

public WriteToken ( ICSharpCode.NRefactory.CSharp.Role role, string token, object data ) : void
role ICSharpCode.NRefactory.CSharp.Role
token string
data object
return void