Skip to content

Commit b4bd6fb

Browse files
committed
ParsingErrorsHandler delegate replaced by Action<HelpText>.
1 parent fef6558 commit b4bd6fb

7 files changed

+11
-42
lines changed

CommandLine.sln.DotSettings.user

+1-1
Large diffs are not rendered by default.

doc/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2013-02-02 Giacomo Stelluti Scala <[email protected]>
2+
3+
* ParsingErrorsHandler delegate replaced by Action<HelpText>.
4+
* Version incremented to 1.9.4.211 beta.
5+
16
2013-01-31 Giacomo Stelluti Scala <[email protected]>
27

38
* Added readonly property Settings of type ParserSettings to IParser, Parser.

doc/PublicAPI.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Public API Changes:
1010
- Version 1.9.4.127: 'Partially' non breaking, ``OptionAttribute`` is now sealed. ``OptionArrayAttribute`` and ``OptionListAttribute`` derives from ``BaseOptionAttribute`` (update your custom types too).
1111
- Version 1.9.4.201: Non breaking, introduced ``ValueOptionAttribute`` enhancement of issue #33.
1212
- Version 1.9.4.207: Breaking: ``CommandLineParser``, ``ICommandLineParser``, ``CommandLineParserSettings``, ``CommandLineParserException`` renamed to ``Parser``, ``IParser``, ``ParserSettings``, ``ParserException`` as explained [here](https://github.com/gsscoder/commandline/issues/48).
13-
- Version 1.9.4.209: Non breaking, added fluent builder (``ParserConfigurator``, see issue #42).
13+
- Version 1.9.4.209: Non breaking, added fluent builder (``ParserConfigurator``, see issue #42).
14+
- Version 1.9.4.211: 'Partially' non breaking, ParsingErrorsHandler delegate replaced by Action<HelpText>.

src/demo/Program.Options.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private sealed class Options
9191
[HelpOption]
9292
public string GetUsage()
9393
{
94-
return HelpText.AutoBuild(this, (HelpText current) => HelpText.DefaultParsingErrorsHandler(this, current));
94+
return HelpText.AutoBuild(this, current => HelpText.DefaultParsingErrorsHandler(this, current));
9595
}
9696
}
9797

src/libcmdline/CommandLine.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
<Compile Include="Attributes\MultiLineTextAttribute.cs" />
113113
<Compile Include="Attributes\AssemblyLicenseAttribute.cs" />
114114
<Compile Include="Attributes\AssemblyUsageAttribute.cs" />
115-
<Compile Include="Text\ParsingErrorsHandler.cs" />
116115
<Compile Include="Text\FormatOptionHelpTextEventArgs.cs" />
117116
<Compile Include="Attributes\HelpVerbOptionAttribute.cs" />
118117
<Compile Include="Attributes\VerbOptionAttribute.cs" />

src/libcmdline/Text/HelpText.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public static HelpText AutoBuild(object options)
194194
/// </returns>
195195
/// <param name='options'>The instance that collected command line arguments parsed with <see cref="Parser"/> class.</param>
196196
/// <param name='errDelegate'>A delegate used to customize the text block for reporting parsing errors.</param>
197-
public static HelpText AutoBuild(object options, ParsingErrorsHandler errDelegate)
197+
public static HelpText AutoBuild(object options, Action<HelpText> errDelegate)
198198
{
199199
return AutoBuild(options, errDelegate, false);
200200
}
@@ -208,7 +208,7 @@ public static HelpText AutoBuild(object options, ParsingErrorsHandler errDelegat
208208
/// <param name='options'>The instance that collected command line arguments parsed with <see cref="Parser"/> class.</param>
209209
/// <param name='errDelegate'>A delegate used to customize the text block for reporting parsing errors.</param>
210210
/// <param name="verbsIndex">If true the output style is consistent with verb commands (no dashes), otherwise it outputs options.</param>
211-
public static HelpText AutoBuild(object options, ParsingErrorsHandler errDelegate, bool verbsIndex)
211+
public static HelpText AutoBuild(object options, Action<HelpText> errDelegate, bool verbsIndex)
212212
{
213213
var auto = new HelpText {
214214
Heading = HeadingInfo.Default,

src/libcmdline/Text/ParsingErrorsHandler.cs

-36
This file was deleted.

0 commit comments

Comments
 (0)