@@ -274,22 +274,9 @@ public static HelpText AutoBuild(object options)
274274 /// An instance of <see cref="CommandLine.Text.HelpText"/> class.
275275 /// </returns>
276276 /// <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>
291278 /// <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 )
293280 {
294281 var auto = new HelpText
295282 {
@@ -299,12 +286,12 @@ public static HelpText AutoBuild(object options, Action<HelpText> errDelegate, b
299286 AddDashesToOption = ! verbsIndex
300287 } ;
301288
302- if ( errDelegate != null )
289+ if ( onError != null )
303290 {
304291 var list = ReflectionUtil . RetrievePropertyList < ParserStateAttribute > ( options ) ;
305292 if ( list != null )
306293 {
307- errDelegate ( auto ) ;
294+ onError ( auto ) ;
308295 }
309296 }
310297
0 commit comments