Skip to content

Commit 490d3d6

Browse files
committed
Merge branch 'master' into develop
2 parents fdf810a + 4505b7e commit 490d3d6

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ __This library provides _hassle free_ command line parsing with a constantly upd
3737

3838
You can utilize the parser library in several ways:
3939

40-
- Install via Nuget/Paket
40+
- Install via Nuget/Paket: [https://www.nuget.org/packages/CommandLineParser/](https://www.nuget.org/packages/CommandLineParser/)
4141
- Integrate directly into your project by copying the .cs files into your project.
4242
- ILMerge during your build process.
4343

appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#version should be changed with any pull requests
2-
version: 2.2.{build}
1+
#version should be only changed with RELEASE eminent, see RELEASE.md
2+
version: 2.3.{build}
33

44
clone_depth: 1
55
pull_requests:
@@ -74,6 +74,5 @@ deploy:
7474
secure: +Zxb8M5W+UJV1yd9n8seu3PvH/hGNPEmgriGBnsSmtxjKPQAJ4+iL7tKAmfPHAuG
7575
artifact: 'NuGetPackages'
7676
on:
77-
branch: /master|v\d+\.\d+\.\d+[.*]/
7877
APPVEYOR_REPO_TAG: true
7978

src/CommandLine/Core/InstanceChooser.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static ParserResult<object> Choose(
1717
IEnumerable<Type> types,
1818
IEnumerable<string> arguments,
1919
StringComparer nameComparer,
20+
bool ignoreValueCase,
2021
CultureInfo parsingCulture,
2122
IEnumerable<ErrorType> nonFatalErrors)
2223
{
@@ -36,7 +37,7 @@ public static ParserResult<object> Choose(
3637
arguments.Skip(1).FirstOrDefault() ?? string.Empty, nameComparer))
3738
: preprocCompare("version")
3839
? MakeNotParsed(types, new VersionRequestedError())
39-
: MatchVerb(tokenizer, verbs, arguments, nameComparer, parsingCulture, nonFatalErrors);
40+
: MatchVerb(tokenizer, verbs, arguments, nameComparer, ignoreValueCase, parsingCulture, nonFatalErrors);
4041
};
4142

4243
return arguments.Any()
@@ -49,6 +50,7 @@ private static ParserResult<object> MatchVerb(
4950
IEnumerable<Tuple<Verb, Type>> verbs,
5051
IEnumerable<string> arguments,
5152
StringComparer nameComparer,
53+
bool ignoreValueCase,
5254
CultureInfo parsingCulture,
5355
IEnumerable<ErrorType> nonFatalErrors)
5456
{
@@ -60,7 +62,7 @@ private static ParserResult<object> MatchVerb(
6062
tokenizer,
6163
arguments.Skip(1),
6264
nameComparer,
63-
false,
65+
ignoreValueCase,
6466
parsingCulture,
6567
nonFatalErrors)
6668
: MakeNotParsed(verbs.Select(v => v.Item2), new BadVerbSelectedError(arguments.First()));

src/CommandLine/Parser.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public ParserResult<object> ParseArguments(IEnumerable<string> args, params Type
156156
types,
157157
args,
158158
settings.NameComparer,
159+
settings.CaseInsensitiveEnumValues,
159160
settings.ParsingCulture,
160161
HandleUnknownArguments(settings.IgnoreUnknownArguments)),
161162
settings);

src/CommandLine/ParserResult.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace CommandLine
88
{
9-
sealed class TypeInfo
9+
public sealed class TypeInfo
1010
{
1111
private readonly Type current;
1212
private readonly IEnumerable<Type> choices;
@@ -27,12 +27,12 @@ public IEnumerable<Type> Choices
2727
get { return this.choices; }
2828
}
2929

30-
public static TypeInfo Create(Type current)
30+
internal static TypeInfo Create(Type current)
3131
{
3232
return new TypeInfo(current, Enumerable.Empty<Type>());
3333
}
3434

35-
public static TypeInfo Create(Type current, IEnumerable<Type> choices)
35+
internal static TypeInfo Create(Type current, IEnumerable<Type> choices)
3636
{
3737
return new TypeInfo(current, choices);
3838
}
@@ -78,7 +78,7 @@ public ParserResultType Tag
7878
get { return this.tag; }
7979
}
8080

81-
internal TypeInfo TypeInfo
81+
public TypeInfo TypeInfo
8282
{
8383
get { return typeInfo; }
8484
}
@@ -216,4 +216,4 @@ public bool Equals(NotParsed<T> other)
216216
&& Errors.SequenceEqual(other.Errors);
217217
}
218218
}
219-
}
219+
}

tests/CommandLine.Tests/Unit/Core/InstanceChooserTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ private static ParserResult<object> InvokeChoose(
2222
types,
2323
arguments,
2424
StringComparer.Ordinal,
25+
false,
2526
CultureInfo.InvariantCulture,
2627
Enumerable.Empty<ErrorType>());
2728
}

0 commit comments

Comments
 (0)