Changeset 14967 for lang/csharp
- Timestamp:
- 07/01/08 03:18:10 (5 months ago)
- Location:
- lang/csharp/CommandLineParser
- Files:
-
- 6 added
- 2 modified
-
CommandLineParser.sln (modified) (2 diffs)
-
CommandLineParser/CommandLineParser.cs (modified) (3 diffs)
-
CommandLineParserTest (added)
-
CommandLineParserTest/AuthoringTests.txt (added)
-
CommandLineParserTest/CommandLineParserTest.csproj (added)
-
CommandLineParserTest/Properties (added)
-
CommandLineParserTest/Properties/AssemblyInfo.cs (added)
-
CommandLineParserTest/UnitTest1.cs (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/csharp/CommandLineParser/CommandLineParser.sln
r5071 r14967 6 6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "Sample\Sample.csproj", "{6D08D680-D1F4-4FF3-8598-5EACEFCB6B71}" 7 7 EndProject 8 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandLineParserTest", "CommandLineParserTest\CommandLineParserTest.csproj", "{1138FFD8-09C8-4F6E-92F1-E35AC8AB04AC}" 9 EndProject 10 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{646A3556-EC2F-4816-BAAC-56FA3CD80A79}" 11 ProjectSection(SolutionItems) = preProject 12 CommandLineParser.vsmdi = CommandLineParser.vsmdi 13 LocalTestRun.testrunconfig = LocalTestRun.testrunconfig 14 EndProjectSection 15 EndProject 8 16 Global 17 GlobalSection(TestCaseManagementSettings) = postSolution 18 CategoryFile = CommandLineParser.vsmdi 19 EndGlobalSection 9 20 GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 21 Debug|Any CPU = Debug|Any CPU … … 20 31 {6D08D680-D1F4-4FF3-8598-5EACEFCB6B71}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 32 {6D08D680-D1F4-4FF3-8598-5EACEFCB6B71}.Release|Any CPU.Build.0 = Release|Any CPU 33 {1138FFD8-09C8-4F6E-92F1-E35AC8AB04AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 {1138FFD8-09C8-4F6E-92F1-E35AC8AB04AC}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 {1138FFD8-09C8-4F6E-92F1-E35AC8AB04AC}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 {1138FFD8-09C8-4F6E-92F1-E35AC8AB04AC}.Release|Any CPU.Build.0 = Release|Any CPU 22 37 EndGlobalSection 23 38 GlobalSection(SolutionProperties) = preSolution -
lang/csharp/CommandLineParser/CommandLineParser/CommandLineParser.cs
r14964 r14967 169 169 170 170 String[] parts = args[i].Split(ValueParamDelimiter, 2); 171 String memberName = (DelimiterizeAndToLowerCase ? ToUpperCamelCase(parts[0]) : parts[0].Substring(Prefix.Length)); 171 parts[0] = parts[0].Substring(Prefix.Length); 172 String memberName = (DelimiterizeAndToLowerCase ? ToUpperCamelCase(parts[0]) : parts[0]); 172 173 173 174 // Help … … 175 176 return default(T); 176 177 177 if (!_availableOptions.ContainsKey(memberName) )178 if (!_availableOptions.ContainsKey(memberName) && !_availableOptions.ContainsKey(parts[0])) 178 179 { 179 180 //Debug.WriteLine(String.Format("Unknown option '{0}'", parts[0])); … … 182 183 } 183 184 184 PropertyInfo optionProperty = _availableOptions[ memberName];185 PropertyInfo optionProperty = _availableOptions[_availableOptions.ContainsKey(memberName) ? memberName : parts[0]]; 185 186 if (parts.Length == 1) 186 187 {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)