Skip to content

Commit 1b3e487

Browse files
committed
ReflectionUtil now caches data using ReflectionCache.
1 parent 3d94d28 commit 1b3e487

26 files changed

+627
-635
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Command Line Parser Library 1.9.4.127 Beta for CLR.
1+
Command Line Parser Library 1.9.4.131 Beta for CLR.
22
===
33
The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks defining switches, options and verb commands. It allows you to display an help screen with an high degree of customization and a simple way to report syntax errors to the end user. Everything that is boring and repetitive to be programmed stands up on library shoulders, letting developers concentrate on core logic.
44
__The search for the command line parser for your application is over, with this library you got a solid parsing API constantly updated since 2005.__
@@ -11,6 +11,7 @@ Compatibility:
1111

1212
News:
1313
---
14+
- ``ReflectionUtil`` now caches data using ``ReflectionCache``.
1415
- Added ``strings`` task to Rakefile used to regenerate ``SR.strings.cs``.
1516
- Internal refactoring on ``OptionMap`` and ``OptionInfo``.
1617
- Refactoring in respect of FxCop rules (see ChangeLog). ``HandleParsingErrorsDelegate`` renamed to ``ParsingErrorsHandler``, ``MultiLineTextAttribute`` renamed to ``MultilineTextAttribute``.

doc/ChangeLog

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2013-01-23 Giacomo Stelluti Scala <[email protected]>
2+
3+
* All CommandLineParser partials merged.
4+
* ReflectionUtil now caches data using ReflectionCache.
5+
* Version incremented to 1.9.4.131 Beta.
6+
7+
2013-01-23 Giacomo Stelluti Scala <[email protected]>
8+
9+
* Enum Internal.ParserState renamed to PresentParerState to avoid confusion with class ParserState.
10+
* TargetWrapper renamed to Target.
11+
* Version incremented to 1.9.4.129 Beta.
12+
113
2013-01-22 Giacomo Stelluti Scala <[email protected]>
214

315
* FxCop SuppressMessage attributes placed in right place (near source of issue).

doc/README

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Command Line Parser Library
33
Project Author/Coordinator: Giacomo Stelluti Scala
44
Main Contributor(s): Steven Evans, Kevin Moore, Dan Nemec (nemec), Alexander Fast (mizipzor)
55
--------------------------------------------------------------------------------------------
6-
Version 1.9.4.127 Beta (*1)
7-
Latest Update: 22-01-2013
6+
Version 1.9.4.131 Beta (*1)
7+
Latest Update: 23-01-2013
88

99
Git home:
1010
https://github.com/gsscoder/commandline

src/demo/CommandLine.Demo.csproj

+15-20
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434
<Reference Include="System" />
3535
</ItemGroup>
3636
<ItemGroup>
37+
<Compile Include="..\libcmdline\Internal\PresentParserState.cs">
38+
<Link>Library\Internal\PresentParserState.cs</Link>
39+
</Compile>
40+
<Compile Include="..\libcmdline\Internal\Target.cs">
41+
<Link>Library\Internal\Target.cs</Link>
42+
</Compile>
43+
<Compile Include="..\libcmdline\ParserState.cs">
44+
<Link>Library\ParserState.cs</Link>
45+
</Compile>
3746
<Compile Include="..\libcmdline\Text\Attributes\AssemblyLicenseAttribute.cs">
3847
<Link>Library\Text\Attributes\AssemblyLicenseAttribute.cs</Link>
3948
</Compile>
@@ -52,6 +61,12 @@
5261
<Compile Include="..\libcmdline\Utils\Pair.cs">
5362
<Link>Library\Utils\Pair.cs</Link>
5463
</Compile>
64+
<Compile Include="..\libcmdline\Utils\ReflectionCache.cs">
65+
<Link>Library\Utils\ReflectionCache.cs</Link>
66+
</Compile>
67+
<Compile Include="..\libcmdline\Utils\ReflectionUtil.cs">
68+
<Link>Library\Utils\ReflectionUtil.cs</Link>
69+
</Compile>
5570
<Compile Include="..\libcmdline\Utils\StringExtensions.cs">
5671
<Link>Library\Utils\StringExtensions.cs</Link>
5772
</Compile>
@@ -82,21 +97,12 @@
8297
<Compile Include="..\libcmdline\Internal\OptionMap.cs">
8398
<Link>Library\Internal\OptionMap.cs</Link>
8499
</Compile>
85-
<Compile Include="..\libcmdline\Internal\ParserState.cs">
86-
<Link>Library\Internal\ParserState.cs</Link>
87-
</Compile>
88-
<Compile Include="..\libcmdline\Internal\ReflectionUtil.cs">
89-
<Link>Library\Internal\ReflectionUtil.cs</Link>
90-
</Compile>
91100
<Compile Include="..\libcmdline\Internal\SR.strings.cs">
92101
<Link>Library\Internal\SR.strings.cs</Link>
93102
</Compile>
94103
<Compile Include="..\libcmdline\Internal\StringArrayEnumerator.cs">
95104
<Link>Library\Internal\StringArrayEnumerator.cs</Link>
96105
</Compile>
97-
<Compile Include="..\libcmdline\Internal\TargetWrapper.cs">
98-
<Link>Library\Internal\TargetWrapper.cs</Link>
99-
</Compile>
100106
<Compile Include="..\libcmdline\Text\BaseSentenceBuilder.cs">
101107
<Link>Library\Text\BaseSentenceBuilder.cs</Link>
102108
</Compile>
@@ -151,14 +157,6 @@
151157
<Compile Include="..\libcmdline\CommandLineParser.cs">
152158
<Link>Library\CommandLineParser.cs</Link>
153159
</Compile>
154-
<Compile Include="..\libcmdline\CommandLineParser.Strict.cs">
155-
<Link>Library\CommandLineParser.Strict.cs</Link>
156-
<DependentUpon>CommandLineParser.cs</DependentUpon>
157-
</Compile>
158-
<Compile Include="..\libcmdline\CommandLineParser.Verbs.cs">
159-
<Link>Library\CommandLineParser.Verbs.cs</Link>
160-
<DependentUpon>CommandLineParser.cs</DependentUpon>
161-
</Compile>
162160
<Compile Include="..\libcmdline\CommandLineParserException.cs">
163161
<Link>Library\CommandLineParserException.cs</Link>
164162
</Compile>
@@ -171,9 +169,6 @@
171169
<Compile Include="..\libcmdline\IParserState.cs">
172170
<Link>Library\IParserState.cs</Link>
173171
</Compile>
174-
<Compile Include="..\libcmdline\ParserState.cs">
175-
<Link>Library\ParserState.cs</Link>
176-
</Compile>
177172
<Compile Include="..\libcmdline\ParsingError.cs">
178173
<Link>Library\ParsingError.cs</Link>
179174
</Compile>

src/libcmdline/Attributes/HelpVerbOptionAttribute.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public HelpVerbOptionAttribute(string longName)
6969
public override char? ShortName
7070
{
7171
get { return null; }
72-
internal set { throw new InvalidOperationException("Help verb command do not support short name by design."); }
72+
internal set { throw new InvalidOperationException(SR.InvalidOperationException_DoNotUseShortNameForVerbCommands); }
7373
}
7474

7575
/// <summary>
@@ -78,7 +78,7 @@ public override char? ShortName
7878
public override bool Required
7979
{
8080
get { return false; }
81-
set { throw new InvalidOperationException("Help verb command cannot be mandatory by design."); }
81+
set { throw new InvalidOperationException(SR.InvalidOperationException_DoNotSetRequiredPropertyForVerbCommands); }
8282
}
8383

8484
internal static void InvokeMethod(object target,

src/libcmdline/Attributes/ValueListAttribute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public ValueListAttribute(Type concreteType)
6161
if (concreteType == null) { throw new ArgumentNullException("concreteType"); }
6262
if (!typeof(IList<string>).IsAssignableFrom(concreteType))
6363
{
64-
throw new CommandLineParserException("The types are incompatible.");
64+
throw new CommandLineParserException(SR.CommandLineParserException_IncompatibleTypes);
6565
}
6666
_concreteType = concreteType;
6767
}

src/libcmdline/CommandLine.csproj

+4-9
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@
8383
<Compile Include="Internal\SR.strings.cs">
8484
<DependentUpon>SR.strings</DependentUpon>
8585
</Compile>
86+
<Compile Include="Utils\ReflectionCache.cs" />
8687
<Compile Include="Utils\SwitchExtensions.cs" />
8788
<Compile Include="Utils\StringExtensions.cs" />
88-
<Compile Include="Internal\ReflectionUtil.cs" />
89+
<Compile Include="Utils\ReflectionUtil.cs" />
8990
<Compile Include="Utils\Pair.cs" />
90-
<Compile Include="Internal\TargetWrapper.cs" />
91+
<Compile Include="Internal\Target.cs" />
9192
<Compile Include="Internal\LongOptionParser.cs" />
9293
<Compile Include="Internal\OptionGroupParser.cs" />
9394
<Compile Include="Internal\OptionInfo.cs" />
@@ -96,7 +97,7 @@
9697
<Compile Include="Internal\StringArrayEnumerator.cs" />
9798
<Compile Include="Internal\ArgumentParser.cs" />
9899
<Compile Include="Internal\IArgumentEnumerator.cs" />
99-
<Compile Include="Internal\ParserState.cs" />
100+
<Compile Include="Internal\PresentParserState.cs" />
100101
<Compile Include="Properties\ThisAssembly.cs" />
101102
<Compile Include="Properties\AssemblyInfo.cs" />
102103
<Compile Include="Text\HelpText.cs" />
@@ -114,12 +115,6 @@
114115
<Compile Include="Attributes\VerbOptionAttribute.cs" />
115116
<Compile Include="BadOptionInfo.cs" />
116117
<Compile Include="CommandLineParser.cs" />
117-
<Compile Include="CommandLineParser.Strict.cs">
118-
<DependentUpon>CommandLineParser.cs</DependentUpon>
119-
</Compile>
120-
<Compile Include="CommandLineParser.Verbs.cs">
121-
<DependentUpon>CommandLineParser.cs</DependentUpon>
122-
</Compile>
123118
<Compile Include="CommandLineParserException.cs" />
124119
<Compile Include="CommandLineParserSettings.cs" />
125120
<Compile Include="ICommandLineParser.cs" />

src/libcmdline/CommandLineParser.Strict.cs

-175
This file was deleted.

0 commit comments

Comments
 (0)