C# Class Google.ProtocolBuffers.TextGenerator

Helper class to control indentation. Used for TextFormat and by ProtoGen.
ファイルを表示 Open project: ayende/dotnet-protobufs Class Usage Examples

Public Methods

Method Description
Indent ( ) : void

Indents text by two spaces. After calling Indent(), two spaces will be inserted at the beginning of each line of text. Indent() may be called multiple times to produce deeper indents.

Outdent ( ) : void

Reduces the current indent level by two spaces.

Print ( string text ) : void

Prints the given text to the output stream, indenting at line boundaries.

TextGenerator ( TextWriter writer ) : System

Creates a generator writing to the given writer. The writer is not closed by this class.

Write ( string format ) : void
WriteLine ( ) : void
WriteLine ( string text ) : void

Method Details

Indent() public method

Indents text by two spaces. After calling Indent(), two spaces will be inserted at the beginning of each line of text. Indent() may be called multiple times to produce deeper indents.
public Indent ( ) : void
return void

Outdent() public method

Reduces the current indent level by two spaces.
public Outdent ( ) : void
return void

Print() public method

Prints the given text to the output stream, indenting at line boundaries.
public Print ( string text ) : void
text string
return void

TextGenerator() public method

Creates a generator writing to the given writer. The writer is not closed by this class.
public TextGenerator ( TextWriter writer ) : System
writer System.IO.TextWriter
return System

Write() public method

public Write ( string format ) : void
format string
return void

WriteLine() public method

public WriteLine ( ) : void
return void

WriteLine() public method

public WriteLine ( string text ) : void
text string
return void