1 write to Templates
Microsoft.TemplateEngine.Cli (1)
TemplateGroup.cs (1)
48
Templates
= templates.ToList();
26 references to Templates
Microsoft.TemplateEngine.Cli (26)
Commands\create\InstantiateCommand.cs (2)
61
foreach (IGrouping<int, CliTemplateInfo> templateGrouping in templateGroup.
Templates
.GroupBy(g => g.Precedence).OrderByDescending(g => g.Key))
120
.DefineColumn(t => t.GroupIdentity ?? t.
Templates
[0].Identity, out object? identityColumn, LocalizableStrings.ColumnNameIdentity, showAlways: true)
Commands\create\InstantiateCommand.Help.cs (1)
346
foreach (IGrouping<int, CliTemplateInfo> templateGrouping in templateGroup.
Templates
.GroupBy(g => g.Precedence).OrderByDescending(g => g.Key))
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
65
foreach (CliTemplateInfo template in templateGroup.
Templates
)
Commands\create\InstantiateCommand.TabCompletion.cs (3)
141
if (templateGroup.
Templates
.SelectMany(t => t.Constraints).Any())
166
return templateGroup.
Templates
;
178
if (group.
Templates
.All(t => t.Constraints.Any()))
Commands\Extensions.cs (1)
55
await constraintManager.EvaluateConstraintsAsync(templateGroup.
Templates
, cancellationToken).ConfigureAwait(false);
TabularOutput\TemplateGroupDisplay.cs (5)
209
ITemplateInfo highestPrecedenceTemplate = templateGroup.
Templates
.OrderByDescending(x => x.Precedence).First();
214
Languages = GetLanguagesToDisplay(templateGroup.
Templates
, language, defaultLanguage, environment),
215
Classifications = GetClassificationsToDisplay(templateGroup.
Templates
, environment),
216
Author = GetAuthorsToDisplay(templateGroup.
Templates
, environment),
217
Type = GetTypesToDisplay(templateGroup.
Templates
, environment),
TemplateGroup.cs (11)
65
foreach (ITemplateInfo template in
Templates
.OrderByDescending(t => t.Precedence))
81
foreach (ITemplateInfo template in
Templates
)
97
foreach (ITemplateInfo template in
Templates
)
113
foreach (ITemplateInfo template in
Templates
)
159
foreach (ITemplateInfo template in
Templates
)
178
internal bool HasSingleTemplate =>
Templates
.Count == 1;
217
var templatePackages = await Task.WhenAll(
Templates
.Select(t => templatePackageManager.GetTemplatePackageAsync(t, cancellationToken))).ConfigureAwait(false);
223
if (!
Templates
.Any())
225
throw new Exception($"{nameof(
Templates
)} cannot be empty collection");
228
int highestPrecedence =
Templates
.Max(t => t.Precedence);
229
return
Templates
.Where(t => t.Precedence == highestPrecedence);
TemplateResolution\ListTemplateResolver.cs (1)
47
templateFilters = templateFilters.Concat(WellKnownSearchFilters.ConstraintFilters(await _constraintManager.GetConstraintsAsync(templateGroups.SelectMany(tg => tg.
Templates
).Cast<ITemplateInfo>(), cancellationToken).ConfigureAwait(false)));
TemplateResolution\TemplateGroupMatchInfo.cs (1)
218
IReadOnlyCollection<ITemplateMatchInfo> templateMatchDispositions = TemplateListFilter.GetTemplateMatchInfo(group.
Templates
, x => true, templateInfoFilters.ToArray());