Emitter Class

Emits YAML streams.

public class Emitter : IEmitter
Implements

Constructors

NameDescription
Emitter(TextWriter, int, int, bool, bool, bool)Initializes a new instance of the IEmitter class.

Emitter(TextWriter, int, int, bool, bool, bool)

Emitter.cs

Initializes a new instance of the IEmitter class.

public Emitter(TextWriter output, int bestIndent = 2, int bestWidth = 2147483647, bool isCanonical = false, bool forceIndentLess = false, bool emitKeyQuoted = false)

Parameters

output TextWriter
The TextWriter where the emitter will write.
bestIndent int
The preferred indentation.
bestWidth int
The preferred text width.
isCanonical bool
If true, write the output in canonical form.
forceIndentLess bool
if set to true [always indent].
emitKeyQuoted bool
if set to true always emit keys double quoted.

Exceptions

ArgumentOutOfRangeException
bestIndent or bestWidth;The bestWidth parameter must be greater than bestIndent * 2.

Properties

NameDescription
ForceIndentLessGets or sets a value indicating whether [always indent].

ForceIndentLess

Emitter.cs

Gets or sets a value indicating whether [always indent].

public bool ForceIndentLess { get; set; }

Property value

bool true if [always indent]; otherwise, false.

Methods

NameDescription
Emit(ParsingEvent)Emit an evt.

Emit(ParsingEvent)

Emitter.cs

Emit an evt.

public void Emit(ParsingEvent @event)

Parameters

event ParsingEvent