UsageWriter Constructor

Initializes a new instance of the UsageWriter class.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public UsageWriter(
	LineWrappingTextWriter? writer = null,
	TriState useColor = TriState.Auto
)

Parameters

writer  LineWrappingTextWriter  (Optional)
A LineWrappingTextWriter instance to write usage to, or null to write to the standard output stream.
useColor  TriState  (Optional)
TriState.True to enable color output using virtual terminal sequences; TriState.False to disable it; or, TriState.Auto to automatically enable it if writer is null using the VirtualTerminal.EnableColor(StandardStream) method.

Remarks

If the writer parameter is null, output is written to a LineWrappingTextWriter for the standard output stream, wrapping at the console's window width. If the stream is redirected, output may still be wrapped, depending on the value returned by Console.WindowWidth.

See Also