@@ -274,22 +274,9 @@ public static HelpText AutoBuild(object options)
274
274
/// An instance of <see cref="CommandLine.Text.HelpText"/> class.
275
275
/// </returns>
276
276
/// <param name='options'>The instance that collected command line arguments parsed with <see cref="Parser"/> class.</param>
277
- /// <param name='errDelegate'>A delegate used to customize the text block for reporting parsing errors.</param>
278
- public static HelpText AutoBuild ( object options , Action < HelpText > errDelegate )
279
- {
280
- return AutoBuild ( options , errDelegate , false ) ;
281
- }
282
-
283
- /// <summary>
284
- /// Creates a new instance of the <see cref="CommandLine.Text.HelpText"/> class using common defaults.
285
- /// </summary>
286
- /// <returns>
287
- /// An instance of <see cref="CommandLine.Text.HelpText"/> class.
288
- /// </returns>
289
- /// <param name='options'>The instance that collected command line arguments parsed with <see cref="Parser"/> class.</param>
290
- /// <param name='errDelegate'>A delegate used to customize the text block for reporting parsing errors.</param>
277
+ /// <param name='onError'>A delegate used to customize the text block for reporting parsing errors.</param>
291
278
/// <param name="verbsIndex">If true the output style is consistent with verb commands (no dashes), otherwise it outputs options.</param>
292
- public static HelpText AutoBuild ( object options , Action < HelpText > errDelegate , bool verbsIndex )
279
+ public static HelpText AutoBuild ( object options , Action < HelpText > onError , bool verbsIndex = false )
293
280
{
294
281
var auto = new HelpText
295
282
{
@@ -299,12 +286,12 @@ public static HelpText AutoBuild(object options, Action<HelpText> errDelegate, b
299
286
AddDashesToOption = ! verbsIndex
300
287
} ;
301
288
302
- if ( errDelegate != null )
289
+ if ( onError != null )
303
290
{
304
291
var list = ReflectionUtil . RetrievePropertyList < ParserStateAttribute > ( options ) ;
305
292
if ( list != null )
306
293
{
307
- errDelegate ( auto ) ;
294
+ onError ( auto ) ;
308
295
}
309
296
}
310
297
0 commit comments