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