1 override of Choices
Microsoft.TemplateEngine.Cli (1)
Commands\create\CombinedChoiceTemplateParameter.cs (1)
28
internal override IReadOnlyDictionary<string, ParameterChoice>
Choices
=> _combinedParameters;
13 references to Choices
Microsoft.TemplateEngine.Cli (13)
ChoiceTemplateParameter.cs (6)
37
_choices = choiceTemplateParameter.
Choices
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase);
55
if (
Choices
.Count > 2)
57
o.Option.HelpName = $"{string.Join("|",
Choices
.Keys.Take(2))}|...";
85
option.FromAmongCaseInsensitive(
Choices
.Keys.ToArray(), allowedHiddenValue: string.Empty);
211
foreach (string choiceValue in parameter.
Choices
.Keys)
229
string.Join(",", parameter.
Choices
.Keys.Select(key => $"'{key}'")));
CliTemplateParameter.cs (2)
473
int longestChoiceLength = choice.
Choices
.Keys.Max(x => x.Length);
474
foreach (KeyValuePair<string, ParameterChoice> choiceInfo in choice.
Choices
)
Commands\create\CombinedChoiceTemplateParameter.cs (4)
19
foreach (var choice in parameter.
Choices
)
36
if (parameter.
Choices
== null)
38
throw new ArgumentException($"{nameof(parameter)} should have {nameof(parameter.
Choices
)}");
41
foreach (var choice in parameter.
Choices
)
Commands\create\InvalidTemplateOptionResult.cs (1)
138
foreach (var choice in choiceParam.
Choices
)