Output Class

Provides output writing functionality for templates.

public class Output

Constructors

NameDescription
Output(Template, TextWriter)Initializes a new instance of the Output class.

Output(Template, TextWriter)

Output.cs

Initializes a new instance of the Output class.

public Output(Template template, TextWriter writer)

Parameters

template Template
The template that this output is associated with.
writer TextWriter
The text writer to write output to.

Properties

NameDescription
TemplateGets the template that this output is associated with.
WriterGets the text writer used to write output.

Template

Output.cs

Gets the template that this output is associated with.

public Template Template { get; }

Property value

Template

Writer

Output.cs

Gets the text writer used to write output.

public TextWriter Writer { get; }

Property value

TextWriter

Methods

NameDescription
Write(object?)Writes the text representation of an object to the output.
Write(string?)Writes a string to the output.
Write(string, object?[])Writes a formatted string to the output.

Write overloads

Write(object?)

Output.cs

Writes the text representation of an object to the output.

public virtual void Write(object? value)
Parameters
value object?
The object to write.

Write(string?)

Output.cs

Writes a string to the output.

public virtual void Write(string? value)
Parameters
value string?
The string to write.

Write(string, object?[])

Output.cs

Writes a formatted string to the output.

public virtual void Write(string format, params object?[] args)
Parameters
format string
The format string.
args object?[]
The objects to format.