Skip to content

Commit e9be6fa

Browse files
committed
Namespace reorganization and Public types rename as stated in issue #48.
1 parent 3892f27 commit e9be6fa

File tree

72 files changed

+481
-589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+481
-589
lines changed

CommandLine.FxCop

+47-43
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<IgnoreGeneratedCode>False</IgnoreGeneratedCode>
2222
</ProjectOptions>
2323
<Targets>
24-
<Target Name="$(ProjectDir)/src/libcmdline/bin/Release/CommandLine.dll" Analyze="True" AnalyzeAllChildren="True" />
24+
<Target Name="$(ProjectDir)/src/libcmdline/bin/Debug/CommandLine.dll" Analyze="True" AnalyzeAllChildren="True" />
2525
</Targets>
2626
<Rules>
2727
<RuleFiles>
@@ -41,7 +41,7 @@
4141
</Rules>
4242
<FxCopReport Version="10.0">
4343
<Targets>
44-
<Target Name="$(ProjectDir)/src/libcmdline/bin/Release/CommandLine.dll">
44+
<Target Name="$(ProjectDir)/src/libcmdline/bin/Debug/CommandLine.dll">
4545
<Modules>
4646
<Module Name="commandline.dll">
4747
<Namespaces>
@@ -51,61 +51,66 @@
5151
<Members>
5252
<Member Name="#.ctor(System.Boolean)">
5353
<Messages>
54-
<Message Id="singleton" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Status="Excluded" Created="2013-01-20 13:57:34Z" FixCategory="NonBreaking">
54+
<Message Id="singleton" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Status="Excluded" Created="2013-01-31 18:34:18Z" FixCategory="NonBreaking">
5555
<Issue>
5656
<Item>'singleton'</Item>
5757
<Item>'CommandLineParser.CommandLineParser(bool)'</Item>
5858
</Issue>
5959
<Notes>
6060
<User Name="vmuser">
61-
<Note Id="2" />
61+
<Note Id="1" />
6262
</User>
6363
</Notes>
6464
</Message>
6565
</Messages>
6666
</Member>
6767
<Member Name="#GetVerbOptionsInstanceByName(System.String,System.Object,System.Boolean&amp;)">
6868
<Messages>
69-
<Message Id="2#" TypeName="AvoidOutParameters" Category="Microsoft.Design" CheckId="CA1021" Created="2013-01-20 13:57:34Z">
69+
<Message Id="2#" TypeName="AvoidOutParameters" Category="Microsoft.Design" CheckId="CA1021" Status="Excluded" Created="2013-01-31 18:34:18Z">
7070
<Issue>
7171
<Item>'found'</Item>
7272
</Issue>
73+
<Notes>
74+
<User Name="vmuser">
75+
<Note Id="4" />
76+
</User>
77+
</Notes>
7378
</Message>
7479
</Messages>
7580
</Member>
7681
</Members>
7782
</Type>
7883
<Type Name="OptionListAttribute">
7984
<Messages>
80-
<Message TypeName="DefineAccessorsForAttributeArguments" Category="Microsoft.Design" CheckId="CA1019" Status="Excluded" Created="2013-01-20 13:57:34Z" FixCategory="Breaking">
85+
<Message TypeName="DefineAccessorsForAttributeArguments" Category="Microsoft.Design" CheckId="CA1019" Status="Excluded" Created="2013-01-31 18:34:18Z" FixCategory="Breaking">
8186
<Issue Name="RemoveSetter">
8287
<Item>'OptionListAttribute.Separator'</Item>
8388
<Item>'separator'</Item>
8489
</Issue>
8590
<Notes>
8691
<User Name="vmuser">
87-
<Note Id="0" />
92+
<Note Id="2" />
8893
</User>
8994
</Notes>
9095
</Message>
9196
</Messages>
9297
</Type>
9398
</Types>
9499
</Namespace>
95-
<Namespace Name="CommandLine.Internal">
100+
<Namespace Name="CommandLine.Core">
96101
<Types>
97-
<Type Name="OptionInfo">
102+
<Type Name="PropertyWriter">
98103
<Members>
99-
<Member Name="#SetNullableValue(System.String,System.Object)">
104+
<Member Name="#WriteNullable(System.String,System.Object)">
100105
<Messages>
101-
<Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Status="Excluded" Created="2013-01-20 13:57:34Z">
106+
<Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Status="Excluded" Created="2013-01-31 18:34:18Z">
102107
<Issue>
103-
<Item>'OptionInfo.SetNullableValue(string, object)'</Item>
108+
<Item>'PropertyWriter.WriteNullable(string, object)'</Item>
104109
<Item>'Exception'</Item>
105110
</Issue>
106111
<Notes>
107112
<User Name="vmuser">
108-
<Note Id="1" />
113+
<Note Id="3" />
109114
</User>
110115
</Notes>
111116
</Message>
@@ -115,54 +120,53 @@
115120
</Type>
116121
</Types>
117122
</Namespace>
118-
<Namespace Name="CommandLine.Text">
123+
<Namespace Name="CommandLine.Helpers">
119124
<Types>
120-
<Type Name="CopyrightInfo">
125+
<Type Name="ReflectionCache">
121126
<Members>
122-
<Member Name="#.ctor(System.Boolean,System.String,System.Int32[])">
127+
<Member Name="#.cctor()">
123128
<Messages>
124-
<Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2013-01-20 13:57:34Z">
129+
<Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Status="Excluded" Created="2013-01-31 18:34:18Z">
125130
<Issue>
126-
<Item>'CopyrightInfo.CopyrightInfo(bool, string, params int[])'</Item>
127-
<Item>&#xD;&#xA;&#xD;&#xA;CopyrightInfo..ctor(Boolean, String, Int32[])&#xD;&#xA;CopyrightInfo.get_CopyrightWord():String</Item>
131+
<Item>'ReflectionCache'</Item>
128132
</Issue>
133+
<Notes>
134+
<User Name="vmuser">
135+
<Note Id="0" />
136+
</User>
137+
</Notes>
129138
</Message>
130139
</Messages>
131140
</Member>
132141
</Members>
133142
</Type>
134-
<Type Name="HelpText">
143+
</Types>
144+
</Namespace>
145+
<Namespace Name="CommandLine.Text">
146+
<Types>
147+
<Type Name="CopyrightInfo">
135148
<Members>
136-
<Member Name="#.ctor(System.String,System.String,System.Object)">
149+
<Member Name="#.ctor(System.Boolean,System.String,System.Int32[])">
137150
<Messages>
138-
<Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2013-01-20 13:57:34Z">
151+
<Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2013-01-31 18:34:18Z">
139152
<Issue>
140-
<Item>'HelpText.HelpText(string, string, object)'</Item>
141-
<Item>&#xD;&#xA;&#xD;&#xA;HelpText..ctor(String, String, Object)&#xD;&#xA;HelpText.AddOptions(Object):Void&#xD;&#xA;HelpText.AddOptions(Object, String):Void&#xD;&#xA;HelpText.AddOptions(Object, String, Int32):Void&#xD;&#xA;HelpText.AddOption(String, Int32, BaseOptionAttribute, Int32):Void&#xD;&#xA;HelpText.OnFormatOptionHelpText(FormatOptionHelpTextEventArgs):Void</Item>
153+
<Item>'CopyrightInfo.CopyrightInfo(bool, string, params int[])'</Item>
154+
<Item>&#xD;&#xA;&#xD;&#xA;CopyrightInfo..ctor(Boolean, String, Int32[])&#xD;&#xA;CopyrightInfo.get_CopyrightWord():String</Item>
142155
</Issue>
143156
</Message>
144157
</Messages>
145158
</Member>
146159
</Members>
147160
</Type>
148-
</Types>
149-
</Namespace>
150-
<Namespace Name="CommandLine.Utils">
151-
<Types>
152-
<Type Name="ReflectionCache">
161+
<Type Name="HelpText">
153162
<Members>
154-
<Member Name="#.cctor()">
163+
<Member Name="#.ctor(System.String,System.String,System.Object)">
155164
<Messages>
156-
<Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Status="Excluded" Created="2013-01-24 13:11:50Z">
165+
<Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2013-01-31 18:34:18Z">
157166
<Issue>
158-
<Item>'ReflectionCache'</Item>
167+
<Item>'HelpText.HelpText(string, string, object)'</Item>
168+
<Item>&#xD;&#xA;&#xD;&#xA;HelpText..ctor(String, String, Object)&#xD;&#xA;HelpText.AddOptions(Object):Void&#xD;&#xA;HelpText.AddOptions(Object, String):Void&#xD;&#xA;HelpText.AddOptions(Object, String, Int32):Void&#xD;&#xA;HelpText.AddOption(String, Int32, BaseOptionAttribute, Int32):Void&#xD;&#xA;HelpText.OnFormatOptionHelpText(FormatOptionHelpTextEventArgs):Void</Item>
159169
</Issue>
160-
<Notes>
161-
<User Name="vmuser">
162-
<Note Id="3" />
163-
<Note Id="4" />
164-
</User>
165-
</Notes>
166170
</Message>
167171
</Messages>
168172
</Member>
@@ -177,11 +181,11 @@
177181
</Targets>
178182
<Notes>
179183
<User Name="vmuser">
180-
<Note Id="0" Modified="2013-01-20 14:49:13Z">The char Separator property matches shortName char constructor argument because the ShortName property is defined in BaseOptionAttribute as nullable char.</Note>
181-
<Note Id="1" Modified="2013-01-20 16:14:59Z">FormatException (thrown by ConvertFromString) is thrown as Exception.InnerException, so we've to catch directly System.Exception.</Note>
182-
<Note Id="2" Modified="2013-01-22 20:28:56Z">The constructor that accepts a boolean is designed to support default singleton, the parameter is ignored.</Note>
183-
<Note Id="3" Modified="2013-01-24 13:17:29Z">Singleton, by design.</Note>
184-
<Note Id="4" Modified="2013-01-24 13:22:57Z">Singleton, by design.</Note>
184+
<Note Id="0" Modified="2013-01-31 18:35:12Z">Singleton, by design.</Note>
185+
<Note Id="1" Modified="2013-01-31 18:36:05Z">The constructor that accepts a boolean is designed to support default singleton, the parameter is ignored.</Note>
186+
<Note Id="2" Modified="2013-01-31 18:37:19Z">The char Separator property matches shortName char constructor argument because the ShortName property is defined in BaseOptionAttribute as nullable char.</Note>
187+
<Note Id="3" Modified="2013-01-31 18:38:22Z">FormatException (thrown by ConvertFromString) is thrown as Exception.InnerException, so we've to catch directly System.Exception.</Note>
188+
<Note Id="4" Modified="2013-01-31 18:38:58Z">By design.</Note>
185189
</User>
186190
</Notes>
187191
<Rules>

CommandLine.sln

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11

2-
Microsoft Visual Studio Solution File, Format Version 11.00
3-
# Visual Studio 2010
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine", "src\libcmdline\CommandLine.csproj", "{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}"
55
EndProject
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine.Tests", "src\tests\CommandLine.Tests.csproj", "{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLine.Demo", "src\demo\CommandLine.Demo.csproj", "{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}"
99
EndProject
10-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{4F498B61-A7BC-4B32-9ACB-901D4F50659B}"
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Welcome", ".Welcome", "{4F498B61-A7BC-4B32-9ACB-901D4F50659B}"
1111
ProjectSection(SolutionItems) = preProject
12-
CommandLine.FxCop = CommandLine.FxCop
13-
Rakefile.rb = Rakefile.rb
12+
doc\ChangeLog = doc\ChangeLog
13+
doc\LICENSE = doc\LICENSE
14+
doc\PublicAPI.md = doc\PublicAPI.md
15+
README.md = README.md
1416
EndProjectSection
1517
EndProject
1618
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{CC062800-4709-4A04-8A0D-DD972C1BFFC5}"
@@ -19,18 +21,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{CC062800
1921
nuget\readme.txt = nuget\readme.txt
2022
EndProjectSection
2123
EndProject
22-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{18282A82-E36C-4938-8397-C0A1166983BA}"
24+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{18282A82-E36C-4938-8397-C0A1166983BA}"
2325
ProjectSection(SolutionItems) = preProject
24-
doc\ChangeLog = doc\ChangeLog
25-
doc\LICENSE = doc\LICENSE
26-
README.md = README.md
26+
Rakefile.rb = Rakefile.rb
2727
EndProjectSection
2828
EndProject
2929
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{350E598F-50C7-45A2-83A6-346AF7D163F5}"
3030
ProjectSection(SolutionItems) = preProject
3131
.nuget\packages.config = .nuget\packages.config
3232
EndProjectSection
3333
EndProject
34+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Develop", "Develop", "{939BEBC0-CE70-4209-A991-0DA4E8F3B9AE}"
35+
ProjectSection(SolutionItems) = preProject
36+
CommandLine.FxCop = CommandLine.FxCop
37+
EndProjectSection
38+
EndProject
3439
Global
3540
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3641
Debug|Any CPU = Debug|Any CPU
@@ -64,8 +69,9 @@ Global
6469
HideSolutionNode = FALSE
6570
EndGlobalSection
6671
GlobalSection(NestedProjects) = preSolution
67-
{CC062800-4709-4A04-8A0D-DD972C1BFFC5} = {4F498B61-A7BC-4B32-9ACB-901D4F50659B}
72+
{939BEBC0-CE70-4209-A991-0DA4E8F3B9AE} = {4F498B61-A7BC-4B32-9ACB-901D4F50659B}
6873
{18282A82-E36C-4938-8397-C0A1166983BA} = {4F498B61-A7BC-4B32-9ACB-901D4F50659B}
74+
{CC062800-4709-4A04-8A0D-DD972C1BFFC5} = {939BEBC0-CE70-4209-A991-0DA4E8F3B9AE}
6975
EndGlobalSection
7076
GlobalSection(MonoDevelopProperties) = preSolution
7177
StartupItem = src\demo\CommandLine.Demo.csproj

CommandLine.sln.DotSettings.user

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

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Command Line Parser Library 1.9.4.205 beta for CLR.
1+
Command Line Parser Library 1.9.4.207 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+
- Prefix ``CommandLine`` removed from main types to achieve name consistency between all library types.
1415
- Removed compilation symbol UNIT_TESTS and DebugTests configuration.
1516
- All names of test fixture methods changed to a new convention (using https://gist.github.com/4655503).
1617
- Started refactoring on test project (migrating from NUnit to Xunit).
@@ -85,7 +86,7 @@ Add few lines to your Main method:
8586
```csharp
8687
static void Main(string[] args) {
8788
var options = new Options();
88-
if (CommandLineParser.Default.ParseArguments(args, options)) {
89+
if (CommandLine.Parser.Default.ParseArguments(args, options)) {
8990
// Consume values here
9091
if (options.Verbose) Console.WriteLine("Filename: {0}", options.InputFile);
9192
}
@@ -108,4 +109,4 @@ Contacts:
108109
Giacomo Stelluti Scala
109110
- gsscoder AT gmail DOT com
110111
- [Blog](http://gsscoder.blogspot.it)
111-
- [Twitter](http://twitter.com/gsscoder)
112+
- [Twitter](http://twitter.com/gsscoder)

build/out/CommandLine.Tests.dll

100755100644
File mode changed.

build/out/CommandLine.dll

100755100644
File mode changed.

doc/ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2013-01-31 Giacomo Stelluti Scala <[email protected]>
2+
3+
* Namespace '.Internal' renamed to '.Core'.
4+
* Types with extension methods moved to new namespace Extensions (following my latest conventions).
5+
* Utility types moved to new Helpers namespace.
6+
* Text/Attributes moved to {root}/Attributes folder.
7+
* CommandLineParser renamed to Parser (yes, I finally dit it!).
8+
- ICommandLineParser -> IParser
9+
- CommandLineParserSettings -> ParserSettings
10+
- CommandLineParserException -> ParserException
11+
* FxCop can scan Debug assembly (because now Debug == Release assembly).
12+
* Version incremented to 1.9.4.207 beta.
13+
114
2013-01-29 Giacomo Stelluti Scala <[email protected]>
215

316
* Better constructor chaining in CommandLineParserSettings.

doc/PublicAPI.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Public API Changes:
99
- Version 1.9.4.123: Breaking, ``HandleParsingErrorsDelegate`` renamed to ``ParsingErrorsHandler``, ``MultiLineTextAttribute`` renamed to ``MultilineTextAttribute``. Non breaking, refactoring (see ChangeLog).
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.
12+
- 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).

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.205 beta (*1)
7-
Latest Update: 28-01-2013
6+
Version 1.9.4.207 beta (*1)
7+
Latest Update: 31-01-2013
88

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

0 commit comments

Comments
 (0)