@@ -23,7 +23,7 @@ public class DefaultHelpTextGenerator : IHelpTextGenerator
23
23
/// The hanging indent writer used for formatting indented and wrapped
24
24
/// descriptions for options and arguments.
25
25
/// </summary>
26
- protected HangingIndentWriter ? indentWriter ;
26
+ protected HangingIndentWriter ? IndentWriter { get ; set ; }
27
27
28
28
/// <summary>
29
29
/// A singleton instance of <see cref="DefaultHelpTextGenerator" />.
@@ -90,7 +90,7 @@ protected virtual void GenerateBody(
90
90
options . Count > 0 ? options . Max ( o => Format ( o ) . Length ) : 0 ,
91
91
commands . Count > 0 ? commands . Max ( c => c . Name ? . Length ?? 0 ) : 0 ) ) ;
92
92
93
- indentWriter = new HangingIndentWriter ( firstColumnWidth + ColumnSeparatorLength , maxLineLength : TryGetConsoleWidth ( ) ) ;
93
+ IndentWriter = new HangingIndentWriter ( firstColumnWidth + ColumnSeparatorLength , maxLineLength : TryGetConsoleWidth ( ) ) ;
94
94
95
95
GenerateUsage ( application , output , arguments , options , commands ) ;
96
96
GenerateArguments ( application , output , arguments , firstColumnWidth ) ;
@@ -172,7 +172,7 @@ protected virtual void GenerateArguments(
172
172
173
173
foreach ( var arg in visibleArguments )
174
174
{
175
- var wrappedDescription = indentWriter ! . Write ( arg . Description ) ;
175
+ var wrappedDescription = IndentWriter ? . Write ( arg . Description ) ;
176
176
var message = string . Format ( outputFormat , arg . Name , wrappedDescription ) ;
177
177
178
178
output . Write ( message ) ;
@@ -202,7 +202,7 @@ protected virtual void GenerateOptions(
202
202
203
203
foreach ( var opt in visibleOptions )
204
204
{
205
- var wrappedDescription = indentWriter ! . Write ( opt . Description ) ;
205
+ var wrappedDescription = IndentWriter ? . Write ( opt . Description ) ;
206
206
var message = string . Format ( outputFormat , Format ( opt ) , wrappedDescription ) ;
207
207
208
208
output . Write ( message ) ;
@@ -235,7 +235,7 @@ protected virtual void GenerateCommands(
235
235
: visibleCommands ;
236
236
foreach ( var cmd in orderedCommands )
237
237
{
238
- var wrappedDescription = indentWriter ! . Write ( cmd . Description ) ;
238
+ var wrappedDescription = IndentWriter ? . Write ( cmd . Description ) ;
239
239
var message = string . Format ( outputFormat , cmd . Name , wrappedDescription ) ;
240
240
241
241
output . Write ( message ) ;
0 commit comments