ParseOptions.UseErrorColor Property

Gets or sets a value that indicates whether error messages should use color.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public bool? UseErrorColor { get; set; }

Property Value

Nullable<Boolean>
true to enable color output; false to disable color output; or null to enable it if the error output supports it.

Remarks

Only the parsing methods that automatically handle errors will use this property.

If this property is null and the Error property is null, color will be used if the standard error stream supports it, as determined by the VirtualTerminal.EnableColor(StandardStream) method.

If this property is set to true explicitly, virtual terminal sequences may be included in the output even if it's not supported, which may lead to garbage characters appearing in the output.

See Also