C# Класс Google.ProtocolBuffers.TextGenerator

Helper class to control indentation. Used for TextFormat and by ProtoGen.
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

Reduces the current indent level by two spaces.
public Outdent ( ) : void
Результат void

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

Prints the given text to the output stream, indenting at line boundaries.
public Print ( string text ) : void
text string
Результат void

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

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

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

public Write ( string format ) : void
format string
Результат void

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

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

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

public WriteLine ( string text ) : void
text string
Результат void