Skip to content

Commit 9e531e3

Browse files
committed
Name refactoring
1 parent 09a9626 commit 9e531e3

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/CommandLine/ParserResult.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ namespace CommandLine
88
{
99
sealed class TypeInfo
1010
{
11-
private readonly Type single;
12-
private readonly IEnumerable<Type> multiple;
11+
private readonly Type current;
12+
private readonly IEnumerable<Type> choices;
1313

14-
private TypeInfo(Type single, IEnumerable<Type> multiple)
14+
private TypeInfo(Type current, IEnumerable<Type> choices)
1515
{
16-
this.single = single;
17-
this.multiple = multiple;
16+
this.current = current;
17+
this.choices = choices;
1818
}
1919

20-
public Type Single
20+
public Type Current
2121
{
22-
get { return single; }
22+
get { return this.current; }
2323
}
2424

25-
public IEnumerable<Type> Multiple
25+
public IEnumerable<Type> Choices
2626
{
27-
get { return multiple; }
27+
get { return this.choices; }
2828
}
2929

3030
public static TypeInfo Create(Type single)

src/CommandLine/Text/HelpText.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ public static HelpText AutoBuild<T>(
223223
ReflectionHelper.GetAttribute<AssemblyUsageAttribute>()
224224
.Do(usage => usage.AddToHelpText(auto, true));
225225

226-
if ((verbsIndex && parserResult.TypeInfo.Multiple.Any()) || errors.Any(e => e.Tag == ErrorType.NoVerbSelectedError))
226+
if ((verbsIndex && parserResult.TypeInfo.Choices.Any()) || errors.Any(e => e.Tag == ErrorType.NoVerbSelectedError))
227227
{
228228
auto.AddDashesToOption = false;
229-
auto.AddVerbs(parserResult.TypeInfo.Multiple.ToArray());
229+
auto.AddVerbs(parserResult.TypeInfo.Choices.ToArray());
230230
}
231231
else
232232
auto.AddOptions(parserResult);
@@ -335,7 +335,7 @@ public HelpText AddOptions<T>(ParserResult<T> result)
335335
if (result == null) throw new ArgumentNullException("result");
336336

337337
return AddOptionsImpl(
338-
GetSpecificationsFromType(result.TypeInfo.Single),
338+
GetSpecificationsFromType(result.TypeInfo.Current),
339339
SentenceBuilder.RequiredWord(),
340340
MaximumDisplayWidth);
341341
}
@@ -368,7 +368,7 @@ public HelpText AddOptions<T>(int maximumLength, ParserResult<T> result)
368368
if (result == null) throw new ArgumentNullException("result");
369369

370370
return AddOptionsImpl(
371-
GetSpecificationsFromType(result.TypeInfo.Single),
371+
GetSpecificationsFromType(result.TypeInfo.Current),
372372
SentenceBuilder.RequiredWord(),
373373
maximumLength);
374374
}
@@ -426,12 +426,12 @@ public static string RenderParsingErrorsText<T>(
426426
.ToString();
427427
}
428428

429-
public static string RenderUsageText<T>(ParserResult<T> parserResult)
430-
{
431-
if (parserResult == null) throw new ArgumentNullException("parserResult");
429+
//public static string RenderUsageText<T>(ParserResult<T> parserResult)
430+
//{
431+
// if (parserResult == null) throw new ArgumentNullException("parserResult");
432432

433-
434-
}
433+
// var examples = GetUsageFromType()
434+
//}
435435

436436
/// <summary>
437437
/// Returns the help screen as a <see cref="System.String"/>.

0 commit comments

Comments
 (0)