C# Class Google.ProtocolBuffers.TextGenerator

Helper class to control indentation. Used for TextFormat and by ProtoGen.
Afficher le fichier Open project: ayende/dotnet-protobufs Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat void

Outdent() public méthode

Reduces the current indent level by two spaces.
public Outdent ( ) : void
Résultat void

Print() public méthode

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

TextGenerator() public méthode

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
Résultat System

Write() public méthode

public Write ( string format ) : void
format string
Résultat void

WriteLine() public méthode

public WriteLine ( ) : void
Résultat void

WriteLine() public méthode

public WriteLine ( string text ) : void
text string
Résultat void