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 to write to the standard output stream.
useColor  TriState  (Optional)
TriStateTrue to enable color output using virtual terminal sequences; TriStateFalse to disable it; or, TriStateAuto to automatically enable it if writer is using the VirtualTerminalEnableColor(StandardStream) method.

Remarks

If the writer parameter is , 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 ConsoleWindowWidth.

See Also