1 interface inheriting from ITemplateInfo
Microsoft.TemplateEngine.Abstractions (1)
ITemplate.cs (1)
11
public interface ITemplate :
ITemplateInfo
, IValidationInfo, IDisposable
7 implementations of ITemplateInfo
Microsoft.TemplateEngine.Cli (1)
CliTemplateInfo.cs (1)
16
internal class CliTemplateInfo :
ITemplateInfo
Microsoft.TemplateEngine.Edge (2)
FilterableTemplateInfo.cs (1)
13
public class FilterableTemplateInfo :
ITemplateInfo
, IShortNameList
Settings\TemplateInfo.cs (1)
13
internal partial class TemplateInfo :
ITemplateInfo
, ITemplateInfoHostJsonCache
Microsoft.TemplateEngine.Utils (1)
IScanTemplateInfoExtensions.cs (1)
20
private class LegacyTemplateInfo :
ITemplateInfo
Microsoft.TemplateSearch.Common (3)
Abstractions\TemplateSearchData.cs (1)
14
public partial class TemplateSearchData :
ITemplateInfo
TemplateDiscoveryMetadata\BlobStorageTemplateInfo.cs (1)
15
internal class BlobStorageTemplateInfo :
ITemplateInfo
TemplateSearchCache\TemplateSearchData.Json.cs (1)
15
public partial class TemplateSearchData :
ITemplateInfo
248 references to ITemplateInfo
Microsoft.TemplateEngine.Abstractions (24)
Constraints\ITemplateConstraint.cs (1)
7
/// Constraint that can be used to filter out <see cref="
ITemplateInfo
"/> from further processing.
Constraints\TemplateConstraintInfo.cs (1)
7
/// Represents information about template constraint definition in template cache <see cref="
ITemplateInfo
"/>.
ISettingsLoader.cs (4)
27
void GetTemplates(HashSet<
ITemplateInfo
> templates);
30
ITemplate LoadTemplate(
ITemplateInfo
info, string baselineName);
45
void WriteTemplateCache(IList<
ITemplateInfo
> templates, string locale);
48
void WriteTemplateCache(IList<
ITemplateInfo
> templates, string locale, bool hasContentChanges);
Parameters\ParameterSetData.cs (3)
29
public ParameterSetData(
ITemplateInfo
templateInfo)
39
public ParameterSetData(
ITemplateInfo
templateInfo, IReadOnlyDictionary<string, string?>? inputParameters)
49
public ParameterSetData(
ITemplateInfo
templateInfo, IReadOnlyDictionary<string, object?>? inputParameters)
TemplateFiltering\ITemplateMatchInfo.cs (1)
14
ITemplateInfo
Info { get; }
TemplateFiltering\MatchInfo.cs (3)
18
/// <param name="kind">the match kind between <see cref="
ITemplateInfo
"/> value and <paramref name="value"/>.</param>
65
/// Template language (<see cref="
ITemplateInfo
.Tags"/> named "language").
70
/// Template type (<see cref="
ITemplateInfo
.Tags"/> named "type").
TemplateFiltering\MatchKind.cs (11)
7
/// Defines the match kind: how the filter with its input values matches the property(ies) of <see cref="
ITemplateInfo
"/>.
12
/// The filter exactly matches the value of <see cref="
ITemplateInfo
"/>.
17
/// The filter partially matches the value of <see cref="
ITemplateInfo
"/>.
23
/// The filter does not match the value of <see cref="
ITemplateInfo
"/>.
24
/// Example: the filter is checking <see cref="
ITemplateInfo
.CacheParameters"/> and the parameter name is not defined in <see cref="
ITemplateInfo
"/>.
29
/// The input passed to the filter is incorrect, impossible to identify property of <see cref="
ITemplateInfo
"/> to check.
30
/// Example: the filter is checking <see cref="
ITemplateInfo
.CacheParameters"/> and the parameter name is not defined in <see cref="
ITemplateInfo
"/>.
35
/// The input passed to the filter is incorrect: the value is different format that is supported by <see cref="
ITemplateInfo
"/> property.
36
/// Example: the filter is checking <see cref="
ITemplateInfo
.CacheParameters"/> and the parameter is boolean but value to match with is string.
Microsoft.TemplateEngine.Cli (89)
CliTemplateInfo.cs (6)
14
/// <see cref="
ITemplateInfo
"/> + <see cref="HostSpecificTemplateData"/>.
18
private readonly
ITemplateInfo
_templateInfo;
22
internal CliTemplateInfo(
ITemplateInfo
templateInfo, HostSpecificTemplateData cliData)
119
internal static IEnumerable<CliTemplateInfo> FromTemplateInfo(IEnumerable<
ITemplateInfo
> templateInfos, IHostSpecificDataLoader hostSpecificDataLoader)
138
/// The method might throw exceptions if <see cref="TemplatePackageManager.GetTemplatePackageAsync(
ITemplateInfo
, CancellationToken)"/> call throws.
152
/// The method might throw exceptions if <see cref="TemplatePackageManager.GetTemplatePackageAsync(
ITemplateInfo
, CancellationToken)"/> call throws.
Commands\BaseCommand.cs (1)
120
IReadOnlyList<
ITemplateInfo
> availableTemplates = await templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
Commands\create\InstantiateCommand.cs (1)
49
IReadOnlyList<
ITemplateInfo
> templates = await templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
Commands\create\InstantiateCommand.TabCompletion.cs (1)
115
IReadOnlyList<
ITemplateInfo
> templates =
Commands\create\TemplateCommand.cs (2)
145
internal static async Task<IReadOnlyList<TemplateConstraintResult>> ValidateConstraintsAsync(TemplateConstraintManager constraintManager,
ITemplateInfo
template, CancellationToken cancellationToken)
152
IReadOnlyList<(
ITemplateInfo
Template, IReadOnlyList<TemplateConstraintResult> Result)> result = await constraintManager.EvaluateConstraintsAsync(new[] { template }, cancellationToken).ConfigureAwait(false);
Commands\Extensions.cs (1)
54
IReadOnlyList<(
ITemplateInfo
Template, IReadOnlyList<TemplateConstraintResult> Result)> results =
Commands\FilterOptionDefinition.cs (2)
83
Func<string?, Func<
ITemplateInfo
, MatchInfo?>> matchFilter,
94
internal Func<string?, Func<
ITemplateInfo
, MatchInfo?>> TemplateMatchFilter { get; } = matchFilter;
Commands\NewCommand.cs (1)
31
IReadOnlyList<
ITemplateInfo
> templates =
Extensions.cs (2)
27
internal static bool IsHiddenByHostFile(this
ITemplateInfo
template, IHostSpecificDataLoader hostSpecificDataLoader)
39
internal static string GetDisplayName(this
ITemplateInfo
template, bool showIdentity = false)
HostSpecificDataLoader.cs (3)
25
private readonly ConcurrentDictionary<
ITemplateInfo
, HostSpecificTemplateData> _cache =
33
public HostSpecificTemplateData ReadHostSpecificTemplateData(
ITemplateInfo
templateInfo)
38
private HostSpecificTemplateData ReadHostSpecificTemplateDataUncached(
ITemplateInfo
templateInfo)
IHostSpecificDataLoader.cs (1)
10
HostSpecificTemplateData ReadHostSpecificTemplateData(
ITemplateInfo
templateInfo);
TabularOutput\TemplateGroupDisplay.cs (13)
55
IEnumerable<
ITemplateInfo
> templates,
71
internal static string GetLanguagesToDisplay(IEnumerable<
ITemplateInfo
> templateGroup, string? language, string? defaultLanguage, IEnvironment environment)
81
foreach (
ITemplateInfo
template in templates)
116
internal static string GetAuthorsToDisplay(IEnumerable<
ITemplateInfo
> templateGroup, IEnvironment environment)
137
IEnumerable<
ITemplateInfo
> templateList,
143
IEnumerable<IGrouping<string?,
ITemplateInfo
>> groupedTemplateList = templateList.GroupBy(x => x.GroupIdentity, x => !string.IsNullOrEmpty(x.GroupIdentity), StringComparer.OrdinalIgnoreCase);
144
foreach (IGrouping<string?,
ITemplateInfo
> templateGroup in groupedTemplateList)
146
ITemplateInfo
highestPrecedenceTemplate = templateGroup.OrderByDescending(x => x.Precedence).First();
167
internal static string GetClassificationsToDisplay(IEnumerable<
ITemplateInfo
> templateGroup, IEnvironment environment)
209
ITemplateInfo
highestPrecedenceTemplate = templateGroup.Templates.OrderByDescending(x => x.Precedence).First();
244
private static IOrderedEnumerable<IGrouping<string,
ITemplateInfo
>> GetAuthorBasedGroups(IEnumerable<
ITemplateInfo
> templateGroup)
252
private static string GetTypesToDisplay(IEnumerable<
ITemplateInfo
> templateGroup, IEnvironment environment)
TelemetryHelper.cs (1)
18
internal static string? PrepareHashedChoiceValue(
ITemplateInfo
template, IReadOnlyDictionary<string, string?> parameterValues, string parameterName)
TemplateGroup.cs (8)
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)
196
/// The method might throw exceptions if <see cref="TemplatePackageManager.GetTemplatePackageAsync(
ITemplateInfo
, CancellationToken)"/> call throws.
211
/// The method might throw exceptions if <see cref="TemplatePackageManager.GetTemplatePackageAsync(
ITemplateInfo
, CancellationToken)"/> call throws.
221
private IEnumerable<
ITemplateInfo
> GetHighestPrecedenceTemplates()
TemplateListCoordinator.cs (3)
151
IEnumerable<
ITemplateInfo
> curatedTemplates = await GetCuratedListAsync(cancellationToken).ConfigureAwait(false);
241
private async Task<IEnumerable<
ITemplateInfo
>> GetCuratedListAsync(CancellationToken cancellationToken)
253
IReadOnlyList<
ITemplateInfo
> templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
TemplatePackageCoordinator.cs (5)
84
ITemplateInfo
template,
401
IEnumerable<
ITemplateInfo
>? packageTemplates;
728
IEnumerable<
ITemplateInfo
> templates = await _templatePackageManager.GetTemplatesAsync(managedPackage, cancellationToken).ConfigureAwait(false);
786
IReadOnlyList<
ITemplateInfo
> templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
808
IReadOnlyList<
ITemplateInfo
> templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
TemplatePackageDisplay.cs (4)
104
IEnumerable<
ITemplateInfo
> templates = await templatePackageManager.GetTemplatesAsync(result.TemplatePackage, cancellationToken).ConfigureAwait(false);
255
IEnumerable<
ITemplateInfo
> templates = await templatePackageManager.GetTemplatesAsync(managedSource, cancellationToken).ConfigureAwait(false);
259
foreach (
ITemplateInfo
info in templates)
394
private async Task EvaluateAndDisplayConstraintsAsync(TemplateConstraintManager constraintsManager, IEnumerable<
ITemplateInfo
> templates, CancellationToken cancellationToken)
TemplateResolution\BaseTemplateResolver.cs (4)
14
internal BaseTemplateResolver(IEnumerable<
ITemplateInfo
> templateList, IHostSpecificDataLoader hostSpecificDataLoader)
22
private readonly IReadOnlyList<
ITemplateInfo
>? _templateList;
31
internal BaseTemplateResolver(IEnumerable<
ITemplateInfo
> templateList, IHostSpecificDataLoader hostSpecificDataLoader)
41
IEnumerable<
ITemplateInfo
> templates;
TemplateResolution\CliFilters.cs (1)
86
internal static Func<
ITemplateInfo
, IEnumerable<MatchInfo>>? EmptyTemplateParameterFilter() => (templateInfo) => Array.Empty<MatchInfo>();
TemplateResolution\ListTemplateResolver.cs (3)
26
public ListTemplateResolver(IEnumerable<
ITemplateInfo
> templateList, IHostSpecificDataLoader hostSpecificDataLoader, TemplateConstraintManager? constraintManager = null)
40
IEnumerable<Func<
ITemplateInfo
, MatchInfo?>> templateFilters =
47
templateFilters = templateFilters.Concat(WellKnownSearchFilters.ConstraintFilters(await _constraintManager.GetConstraintsAsync(templateGroups.SelectMany(tg => tg.Templates).Cast<
ITemplateInfo
>(), cancellationToken).ConfigureAwait(false)));
TemplateResolution\TemplateGroupMatchInfo.cs (13)
157
/// Returns the list of <see cref="
ITemplateInfo
"></see> for all templates that matches template info filters.
158
/// Same as <see cref="TemplateMatchInfosWithMatchingInfo"/>, but returns <see cref="
ITemplateInfo
"/> without match information.
160
internal IEnumerable<
ITemplateInfo
> TemplatesWithMatchingInfo => TemplateMatchInfosWithMatchingInfo.Select(template => template.Info);
163
/// Returns the list of <see cref="
ITemplateInfo
"></see> for all templates that matches template info filters and template options filters.
164
/// Same as <see cref="TemplateMatchInfosWithMatchingParameters"/>, but returns <see cref="
ITemplateInfo
"/> without match information.
166
internal IEnumerable<
ITemplateInfo
> TemplatesWithMatchingParameters => TemplateMatchInfosWithMatchingParameters.Select(template => template.Info);
169
/// Returns the list of <see cref="
ITemplateInfo
"></see> for all templates of preferred language that matches template info filters, template options filters.
170
/// Same as <see cref="TemplateMatchInfosWithMatchingParametersForPreferredLanguage"/>, but returns <see cref="
ITemplateInfo
"/> without match information.
172
internal IEnumerable<
ITemplateInfo
> TemplatesWithMatchingParametersForPreferredLanguage
194
IEnumerable<Func<
ITemplateInfo
, MatchInfo?>> templateInfoFilters,
195
Func<
ITemplateInfo
, IEnumerable<MatchInfo>>? templateParametersFilter = null)
245
internal (
ITemplateInfo
Template, IReadOnlyDictionary<string, string?> Parameters)? GetTemplateToInvoke()
286
internal IEnumerable<
ITemplateInfo
> GetHighestPrecedenceTemplates()
TemplateResolution\TemplateResolutionResult.cs (3)
25
private (
ITemplateInfo
Template, IReadOnlyDictionary<string, string?> Parameters)? _templateToInvoke;
122
internal (
ITemplateInfo
Template, IReadOnlyDictionary<string, string?> Parameters)? TemplateToInvoke
342
IEnumerable<
ITemplateInfo
> highestPrecedenceTemplates = _unambiguousTemplateGroup.GetHighestPrecedenceTemplates();
TemplateSearch\CliSearchFiltersFactory.cs (4)
49
internal static Func<TemplatePackageSearchData, IReadOnlyList<
ITemplateInfo
>> GetMatchingTemplatesFilter(SearchCommandArgs commandArgs)
61
IEnumerable<Func<
ITemplateInfo
, MatchInfo?>> templateFilters =
106
hostSpecificData[((
ITemplateInfo
)templateData).Identity] = hostData;
112
public HostSpecificTemplateData ReadHostSpecificTemplateData(
ITemplateInfo
templateInfo)
TemplateSearch\CliTemplateSearchCoordinator.cs (6)
111
internal static async Task<(NugetPackageMetadata?, IReadOnlyList<
ITemplateInfo
>)> SearchForPackageDetailsAsync(
129
return (null, new List<
ITemplateInfo
>());
132
internal static async Task<IReadOnlyList<
ITemplateInfo
>> SearchForPackageTemplatesAsync(
150
return new List<
ITemplateInfo
>();
175
IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)> results,
228
IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)> results,
Microsoft.TemplateEngine.Edge (69)
FilterableTemplateInfo.cs (3)
15
private readonly
ITemplateInfo
_source;
19
private FilterableTemplateInfo(
ITemplateInfo
source)
81
public static FilterableTemplateInfo FromITemplateInfo(
ITemplateInfo
source)
Settings\FilteredTemplateInfo.cs (2)
12
public FilteredTemplateInfo(
ITemplateInfo
info, IReadOnlyList<MatchInfo> matchDisposition)
18
public
ITemplateInfo
Info { get; }
Settings\ITemplateInfoHostJsonCache.cs (1)
9
/// Extension interface of <see cref="
ITemplateInfo
"/> which stores .host.json data in cache so host doesn't need to re-load it from .nupkg every time.
Settings\TemplateInfo.cs (4)
144
string
ITemplateInfo
.ShortName
164
IReadOnlyDictionary<string, ICacheTag>
ITemplateInfo
.Tags
188
IReadOnlyDictionary<string, ICacheParameter>
ITemplateInfo
.CacheParameters
232
bool
ITemplateInfo
.HasScriptRunningPostActions { get; set; }
Settings\TemplateInfoReader.cs (1)
55
JsonObject? baselineJObject = entry.Get<JsonObject>(nameof(
ITemplateInfo
.BaselineInfo));
Settings\TemplateMatchInfo.cs (6)
16
public TemplateMatchInfoEx(
ITemplateInfo
info, IReadOnlyList<MatchInfo> matchDispositions)
28
public TemplateMatchInfoEx(
ITemplateInfo
info)
35
public
ITemplateInfo
Info { get; }
67
internal TemplateMatchInfo(
ITemplateInfo
info, IReadOnlyList<Abstractions.TemplateFiltering.MatchInfo> matchDispositions)
79
internal TemplateMatchInfo(
ITemplateInfo
info)
84
public
ITemplateInfo
Info { get; }
Settings\TemplatePackageManager.cs (8)
154
public async Task<IReadOnlyList<
ITemplateInfo
>> GetTemplatesAsync(CancellationToken cancellationToken)
172
public async Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(Func<ITemplateMatchInfo, bool> matchFilter, IEnumerable<Func<
ITemplateInfo
, MatchInfo?>> filters, CancellationToken cancellationToken)
175
IReadOnlyList<
ITemplateInfo
> templates = await GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
195
public async Task<ITemplatePackage> GetTemplatePackageAsync(
ITemplateInfo
template, CancellationToken cancellationToken)
203
/// Returns all <see cref="
ITemplateInfo
"/> contained by <paramref name="templatePackage"/>.
208
public async Task<IEnumerable<
ITemplateInfo
>> GetTemplatesAsync(ITemplatePackage templatePackage, CancellationToken cancellationToken)
216
/// Returns managed template package <see cref="IManagedTemplatePackage"/> matching <paramref name="packageIdentifier"/> and containing templates <see cref="
ITemplateInfo
"/>.
223
public async Task<(IManagedTemplatePackage? Package, IEnumerable<
ITemplateInfo
>? Templates)> GetManagedTemplatePackageAsync(string packageIdentifier, string? packageVersion = null, CancellationToken cancellationToken = default)
Template\IFilteredTemplateInfo.cs (1)
11
ITemplateInfo
Info { get; }
Template\InputDataSet.cs (3)
33
public InputDataSet(
ITemplateInfo
templateInfo)
43
public InputDataSet(
ITemplateInfo
templateInfo, IReadOnlyDictionary<string, string?> inputParameters)
47
private InputDataSet(
ITemplateInfo
templateInfo, IReadOnlyDictionary<string, object?>? inputParameters)
Template\ITemplateCreationResult.cs (1)
9
/// Represents result of template instantiation / dry run via <see cref="TemplateCreator.InstantiateAsync(
ITemplateInfo
, string?, string?, string?, System.Collections.Generic.IReadOnlyDictionary{string, string?}, bool, string?, bool, System.Threading.CancellationToken)"></see>. />.
Template\ITemplateMatchInfo.cs (1)
12
ITemplateInfo
Info { get; }
Template\TemplateCreator.cs (9)
40
ITemplateInfo
templateInfo,
77
ITemplateInfo
templateInfo,
234
/// Fully load template from <see cref="
ITemplateInfo
"/>.
235
/// <see cref="
ITemplateInfo
"/> usually comes from cache and is missing some information.
242
internal Task<ITemplate?> LoadTemplateAsync(
ITemplateInfo
info, string? baselineName, CancellationToken cancellationToken)
263
private static IExtendedTemplateLocator ToITemplateLocator(
ITemplateInfo
templateInfo)
450
/// Fully load template from <see cref="
ITemplateInfo
"/>.
451
/// <see cref="
ITemplateInfo
"/> usually comes from cache and is missing some information.
459
public ITemplate? LoadTemplate(
ITemplateInfo
info, string? baselineName)
Template\TemplateEqualityComparer.cs (5)
9
public class TemplateEqualityComparer : IEqualityComparer<
ITemplateInfo
>
11
public static IEqualityComparer<
ITemplateInfo
> Default { get; } = new TemplateEqualityComparer();
13
public bool Equals(
ITemplateInfo
x,
ITemplateInfo
y)
18
public int GetHashCode(
ITemplateInfo
obj)
Template\WellKnownSearchFilters.cs (7)
12
public static Func<
ITemplateInfo
, MatchInfo?> NameFilter(string name)
57
public static Func<
ITemplateInfo
, MatchInfo?> ContextFilter(string inputContext)
86
public static Func<
ITemplateInfo
, MatchInfo?> TagFilter(string tagFilter)
105
public static Func<
ITemplateInfo
, MatchInfo?> LanguageFilter(string language)
125
public static Func<
ITemplateInfo
, MatchInfo?> BaselineFilter(string baselineName)
146
public static Func<
ITemplateInfo
, MatchInfo?> ClassificationsFilter(string name)
191
public static Func<
ITemplateInfo
, MatchInfo?> AuthorFilter(string author)
TemplateConstraintManager.cs (5)
40
public async Task<IReadOnlyList<ITemplateConstraint>> GetConstraintsAsync(IEnumerable<
ITemplateInfo
>? templates = null, CancellationToken cancellationToken = default)
146
public async Task<IReadOnlyList<(
ITemplateInfo
Template, IReadOnlyList<TemplateConstraintResult> Result)>> EvaluateConstraintsAsync(IEnumerable<
ITemplateInfo
> templates, CancellationToken cancellationToken)
182
List<(
ITemplateInfo
, IReadOnlyList<TemplateConstraintResult>)> evaluationResult = new();
183
foreach (
ITemplateInfo
template in templates)
TemplateListFilter.cs (12)
27
public static IReadOnlyCollection<IFilteredTemplateInfo> FilterTemplates(IReadOnlyList<
ITemplateInfo
> templateList, bool exactMatchesOnly, params Func<
ITemplateInfo
, MatchInfo?>[] filters)
31
foreach (
ITemplateInfo
template in templateList)
35
foreach (Func<
ITemplateInfo
, MatchInfo?> filter in filters)
72
public static IReadOnlyCollection<ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<
ITemplateInfo
> templateList, Func<ITemplateMatchInfo, bool> matchFilter, params Func<
ITemplateInfo
, MatchInfo?>[] filters)
76
foreach (
ITemplateInfo
template in templateList)
80
foreach (Func<
ITemplateInfo
, MatchInfo?> filter in filters)
106
public static IReadOnlyCollection<Abstractions.TemplateFiltering.ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<
ITemplateInfo
> templateList, Func<Abstractions.TemplateFiltering.ITemplateMatchInfo, bool> matchFilter, params Func<
ITemplateInfo
, Abstractions.TemplateFiltering.MatchInfo?>[] filters)
110
foreach (
ITemplateInfo
template in templateList)
114
foreach (Func<
ITemplateInfo
, Abstractions.TemplateFiltering.MatchInfo?> filter in filters)
Microsoft.TemplateEngine.IDE (8)
Bootstrapper.cs (8)
102
public Task<IReadOnlyList<
ITemplateInfo
>> GetTemplatesAsync(CancellationToken cancellationToken)
116
public Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(IEnumerable<Func<
ITemplateInfo
, MatchInfo?>> filters, bool exactMatchesOnly = true, CancellationToken cancellationToken = default)
145
ITemplateInfo
info,
178
ITemplateInfo
info,
210
ITemplateInfo
info,
365
public async Task<IReadOnlyCollection<Edge.Template.IFilteredTemplateInfo>> ListTemplates(bool exactMatchesOnly, params Func<
ITemplateInfo
, Edge.Template.MatchInfo?>[] filters)
452
public async Task<ICreationResult?> CreateAsync(
ITemplateInfo
info, string name, string outputPath, IReadOnlyDictionary<string, string?> parameters, bool skipUpdateCheck, string baselineName)
459
public async Task<ICreationEffects?> GetCreationEffectsAsync(
ITemplateInfo
info, string name, string outputPath, IReadOnlyDictionary<string, string?> parameters, string baselineName)
Microsoft.TemplateEngine.Utils (19)
IScanTemplateInfoExtensions.cs (4)
13
/// Converts <see cref="IScanTemplateInfo"/> to <see cref="
ITemplateInfo
"/>.
16
/// <param name="locFilePath">the path to localization file to use in <see cref="
ITemplateInfo
"/>.</param>
17
/// <param name="hostFilePath">the path to host config file to use in <see cref="
ITemplateInfo
"/>.</param>
18
public static
ITemplateInfo
ToITemplateInfo(this IScanTemplateInfo templateInfo, string? locFilePath = null, string? hostFilePath = null) => new LegacyTemplateInfo(templateInfo, locFilePath, hostFilePath);
TemplateInfoExtensions.cs (5)
19
public static string? GetLanguage(this
ITemplateInfo
template)
30
public static string? GetTemplateType(this
ITemplateInfo
template)
41
public static string? GetTagValue(this
ITemplateInfo
template, string tagName)
56
public static ITemplateParameter? GetParameter(this
ITemplateInfo
template, string parameterName)
68
public static ITemplateParameter? GetChoiceParameter(this
ITemplateInfo
template, string parameterName)
WellKnownSearchFilters.cs (10)
11
/// Collection of the predicates to be used for filtering templates by the most used <see cref="
ITemplateInfo
"/> properties.
37
public static Func<
ITemplateInfo
, MatchInfo?> NameFilter(string name)
84
/// - if <paramref name="inputType"/> is equal to tag named 'type' from <see cref="
ITemplateInfo
.Tags"/> (case insensitive), adds match disposition <see cref="MatchInfo.BuiltIn.Type"/> with <see cref="MatchKind.Exact"/>;<br/>
88
public static Func<
ITemplateInfo
, MatchInfo?> TypeFilter(string? inputType)
116
public static Func<
ITemplateInfo
, MatchInfo?> ClassificationFilter(string? classification)
135
/// - if <paramref name="language"/> is equal to tag named 'language' from <see cref="
ITemplateInfo
.Tags"/> (case insensitive), adds match disposition <see cref="MatchInfo.BuiltIn.Language"/> with <see cref="MatchKind.Exact"/>;<br/>
139
public static Func<
ITemplateInfo
, MatchInfo?> LanguageFilter(string? language)
166
public static Func<
ITemplateInfo
, MatchInfo?> BaselineFilter(string? baselineName)
195
public static Func<
ITemplateInfo
, MatchInfo?> AuthorFilter(string? author)
233
public static IEnumerable<Func<
ITemplateInfo
, MatchInfo?>> ConstraintFilters(IEnumerable<ITemplateConstraint> constraintDefinitions)
Microsoft.TemplateSearch.Common (39)
Abstractions\ITemplateSearchProvider.cs (2)
25
Task<IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)>> SearchForTemplatePackagesAsync(
27
Func<TemplatePackageSearchData, IReadOnlyList<
ITemplateInfo
>> matchingTemplatesFilter,
Abstractions\TemplateSearchData.cs (6)
16
public TemplateSearchData(
ITemplateInfo
templateInfo, IDictionary<string, object>? data = null)
83
string
ITemplateInfo
.ShortName => TemplateInfo.ShortName;
86
IReadOnlyDictionary<string, ICacheTag>
ITemplateInfo
.Tags => TemplateInfo.Tags;
89
IReadOnlyDictionary<string, ICacheParameter>
ITemplateInfo
.CacheParameters => TemplateInfo.CacheParameters;
102
bool
ITemplateInfo
.HasScriptRunningPostActions { get => TemplateInfo.HasScriptRunningPostActions; set => throw new NotImplementedException(); }
109
private
ITemplateInfo
TemplateInfo { get; }
Providers\NuGetMetadataSearchProvider.cs (4)
62
public async Task<IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)>> SearchForTemplatePackagesAsync(
64
Func<TemplatePackageSearchData, IReadOnlyList<
ITemplateInfo
>> matchingTemplatesFilter,
80
List<(ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)> matchingTemplates = filteredPackages
81
.Select<TemplatePackageSearchData, (ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)>(package => (package, matchingTemplatesFilter(package)))
SearchResult.cs (2)
18
IReadOnlyList<(ITemplatePackageInfo, IReadOnlyList<
ITemplateInfo
>)>? hits = null)
52
public IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<
ITemplateInfo
> MatchedTemplates)> SearchHits { get; }
TemplateDiscoveryMetadata\BlobStorageTemplateInfo.cs (4)
17
public BlobStorageTemplateInfo(
ITemplateInfo
templateInfo)
109
string
ITemplateInfo
.ShortName => ShortNameList.Count > 0 ? ShortNameList[0] : string.Empty;
139
bool
ITemplateInfo
.HasScriptRunningPostActions { get; set; }
178
JsonObject? baselineJObject = entry.Get<JsonObject>(nameof(
ITemplateInfo
.BaselineInfo));
TemplateDiscoveryMetadata\LegacySearchCacheReader.cs (5)
24
var
foundTemplate = discoveryMetadata.TemplateCache.FirstOrDefault(t => t.Identity.Equals(template.Identity, StringComparison.OrdinalIgnoreCase));
70
&& TryReadTemplateList(logger, cacheObject, out IReadOnlyList<
ITemplateInfo
>? templateList)
98
out IReadOnlyList<
ITemplateInfo
>? templateList)
106
List<
ITemplateInfo
> buildingTemplateList = new List<
ITemplateInfo
>();
TemplateDiscoveryMetadata\TemplateDiscoveryMetadata.cs (2)
17
internal TemplateDiscoveryMetadata(string version, IReadOnlyList<
ITemplateInfo
> templateCache, IReadOnlyDictionary<string, PackToTemplateEntry> packToTemplateMap, IReadOnlyDictionary<string, object> additionalData)
29
internal IReadOnlyList<
ITemplateInfo
> TemplateCache { get; }
TemplateSearchCache\TemplateSearchData.Json.cs (13)
57
writer.WritePropertyName(nameof(
ITemplateInfo
.Identity));
61
writer.WritePropertyName(nameof(
ITemplateInfo
.GroupIdentity));
66
writer.WritePropertyName(nameof(
ITemplateInfo
.Precedence));
69
writer.WritePropertyName(nameof(
ITemplateInfo
.Name));
71
writer.WritePropertyName(nameof(
ITemplateInfo
.ShortNameList));
83
writer.WritePropertyName(nameof(
ITemplateInfo
.Author));
88
writer.WritePropertyName(nameof(
ITemplateInfo
.Description));
93
writer.WritePropertyName(nameof(
ITemplateInfo
.ThirdPartyNotices));
99
writer.WritePropertyName(nameof(
ITemplateInfo
.Classifications));
113
writer.WritePropertyName(nameof(
ITemplateInfo
.TagsCollection));
126
writer.WritePropertyName(nameof(
ITemplateInfo
.Parameters));
179
writer.WritePropertyName(nameof(
ITemplateInfo
.BaselineInfo));
185
writer.WritePropertyName(nameof(
ITemplateInfo
.PostActions));
TemplateSearchCoordinator.cs (1)
41
Func<TemplatePackageSearchData, IReadOnlyList<
ITemplateInfo
>> matchingTemplatesFilter,