1 interface inheriting from ITemplateInfo
Microsoft.TemplateEngine.Abstractions (1)
ITemplate.cs (1)
11public interface ITemplate : ITemplateInfo, IValidationInfo, IDisposable
7 implementations of ITemplateInfo
Microsoft.TemplateEngine.Cli (1)
CliTemplateInfo.cs (1)
16internal class CliTemplateInfo : ITemplateInfo
Microsoft.TemplateEngine.Edge (2)
FilterableTemplateInfo.cs (1)
13public class FilterableTemplateInfo : ITemplateInfo, IShortNameList
Settings\TemplateInfo.cs (1)
13internal partial class TemplateInfo : ITemplateInfo, ITemplateInfoHostJsonCache
Microsoft.TemplateEngine.Utils (1)
IScanTemplateInfoExtensions.cs (1)
20private class LegacyTemplateInfo : ITemplateInfo
Microsoft.TemplateSearch.Common (3)
Abstractions\TemplateSearchData.cs (1)
14public partial class TemplateSearchData : ITemplateInfo
TemplateDiscoveryMetadata\BlobStorageTemplateInfo.cs (1)
15internal class BlobStorageTemplateInfo : ITemplateInfo
TemplateSearchCache\TemplateSearchData.Json.cs (1)
15public 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)
27void GetTemplates(HashSet<ITemplateInfo> templates); 30ITemplate LoadTemplate(ITemplateInfo info, string baselineName); 45void WriteTemplateCache(IList<ITemplateInfo> templates, string locale); 48void WriteTemplateCache(IList<ITemplateInfo> templates, string locale, bool hasContentChanges);
Parameters\ParameterSetData.cs (3)
29public ParameterSetData(ITemplateInfo templateInfo) 39public ParameterSetData(ITemplateInfo templateInfo, IReadOnlyDictionary<string, string?>? inputParameters) 49public ParameterSetData(ITemplateInfo templateInfo, IReadOnlyDictionary<string, object?>? inputParameters)
TemplateFiltering\ITemplateMatchInfo.cs (1)
14ITemplateInfo 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"/>. 18private readonly ITemplateInfo _templateInfo; 22internal CliTemplateInfo(ITemplateInfo templateInfo, HostSpecificTemplateData cliData) 119internal 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)
120IReadOnlyList<ITemplateInfo> availableTemplates = await templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
Commands\create\InstantiateCommand.cs (1)
49IReadOnlyList<ITemplateInfo> templates = await templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
Commands\create\InstantiateCommand.TabCompletion.cs (1)
115IReadOnlyList<ITemplateInfo> templates =
Commands\create\TemplateCommand.cs (2)
145internal static async Task<IReadOnlyList<TemplateConstraintResult>> ValidateConstraintsAsync(TemplateConstraintManager constraintManager, ITemplateInfo template, CancellationToken cancellationToken) 152IReadOnlyList<(ITemplateInfo Template, IReadOnlyList<TemplateConstraintResult> Result)> result = await constraintManager.EvaluateConstraintsAsync(new[] { template }, cancellationToken).ConfigureAwait(false);
Commands\Extensions.cs (1)
54IReadOnlyList<(ITemplateInfo Template, IReadOnlyList<TemplateConstraintResult> Result)> results =
Commands\FilterOptionDefinition.cs (2)
83Func<string?, Func<ITemplateInfo, MatchInfo?>> matchFilter, 94internal Func<string?, Func<ITemplateInfo, MatchInfo?>> TemplateMatchFilter { get; } = matchFilter;
Commands\NewCommand.cs (1)
31IReadOnlyList<ITemplateInfo> templates =
Extensions.cs (2)
27internal static bool IsHiddenByHostFile(this ITemplateInfo template, IHostSpecificDataLoader hostSpecificDataLoader) 39internal static string GetDisplayName(this ITemplateInfo template, bool showIdentity = false)
HostSpecificDataLoader.cs (3)
25private readonly ConcurrentDictionary<ITemplateInfo, HostSpecificTemplateData> _cache = 33public HostSpecificTemplateData ReadHostSpecificTemplateData(ITemplateInfo templateInfo) 38private HostSpecificTemplateData ReadHostSpecificTemplateDataUncached(ITemplateInfo templateInfo)
IHostSpecificDataLoader.cs (1)
10HostSpecificTemplateData ReadHostSpecificTemplateData(ITemplateInfo templateInfo);
TabularOutput\TemplateGroupDisplay.cs (13)
55IEnumerable<ITemplateInfo> templates, 71internal static string GetLanguagesToDisplay(IEnumerable<ITemplateInfo> templateGroup, string? language, string? defaultLanguage, IEnvironment environment) 81foreach (ITemplateInfo template in templates) 116internal static string GetAuthorsToDisplay(IEnumerable<ITemplateInfo> templateGroup, IEnvironment environment) 137IEnumerable<ITemplateInfo> templateList, 143IEnumerable<IGrouping<string?, ITemplateInfo>> groupedTemplateList = templateList.GroupBy(x => x.GroupIdentity, x => !string.IsNullOrEmpty(x.GroupIdentity), StringComparer.OrdinalIgnoreCase); 144foreach (IGrouping<string?, ITemplateInfo> templateGroup in groupedTemplateList) 146ITemplateInfo highestPrecedenceTemplate = templateGroup.OrderByDescending(x => x.Precedence).First(); 167internal static string GetClassificationsToDisplay(IEnumerable<ITemplateInfo> templateGroup, IEnvironment environment) 209ITemplateInfo highestPrecedenceTemplate = templateGroup.Templates.OrderByDescending(x => x.Precedence).First(); 244private static IOrderedEnumerable<IGrouping<string, ITemplateInfo>> GetAuthorBasedGroups(IEnumerable<ITemplateInfo> templateGroup) 252private static string GetTypesToDisplay(IEnumerable<ITemplateInfo> templateGroup, IEnvironment environment)
TelemetryHelper.cs (1)
18internal static string? PrepareHashedChoiceValue(ITemplateInfo template, IReadOnlyDictionary<string, string?> parameterValues, string parameterName)
TemplateGroup.cs (8)
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) 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. 221private IEnumerable<ITemplateInfo> GetHighestPrecedenceTemplates()
TemplateListCoordinator.cs (3)
151IEnumerable<ITemplateInfo> curatedTemplates = await GetCuratedListAsync(cancellationToken).ConfigureAwait(false); 241private async Task<IEnumerable<ITemplateInfo>> GetCuratedListAsync(CancellationToken cancellationToken) 253IReadOnlyList<ITemplateInfo> templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
TemplatePackageCoordinator.cs (5)
84ITemplateInfo template, 401IEnumerable<ITemplateInfo>? packageTemplates; 728IEnumerable<ITemplateInfo> templates = await _templatePackageManager.GetTemplatesAsync(managedPackage, cancellationToken).ConfigureAwait(false); 786IReadOnlyList<ITemplateInfo> templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false); 808IReadOnlyList<ITemplateInfo> templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
TemplatePackageDisplay.cs (4)
104IEnumerable<ITemplateInfo> templates = await templatePackageManager.GetTemplatesAsync(result.TemplatePackage, cancellationToken).ConfigureAwait(false); 255IEnumerable<ITemplateInfo> templates = await templatePackageManager.GetTemplatesAsync(managedSource, cancellationToken).ConfigureAwait(false); 259foreach (ITemplateInfo info in templates) 394private async Task EvaluateAndDisplayConstraintsAsync(TemplateConstraintManager constraintsManager, IEnumerable<ITemplateInfo> templates, CancellationToken cancellationToken)
TemplateResolution\BaseTemplateResolver.cs (4)
14internal BaseTemplateResolver(IEnumerable<ITemplateInfo> templateList, IHostSpecificDataLoader hostSpecificDataLoader) 22private readonly IReadOnlyList<ITemplateInfo>? _templateList; 31internal BaseTemplateResolver(IEnumerable<ITemplateInfo> templateList, IHostSpecificDataLoader hostSpecificDataLoader) 41IEnumerable<ITemplateInfo> templates;
TemplateResolution\CliFilters.cs (1)
86internal static Func<ITemplateInfo, IEnumerable<MatchInfo>>? EmptyTemplateParameterFilter() => (templateInfo) => Array.Empty<MatchInfo>();
TemplateResolution\ListTemplateResolver.cs (3)
26public ListTemplateResolver(IEnumerable<ITemplateInfo> templateList, IHostSpecificDataLoader hostSpecificDataLoader, TemplateConstraintManager? constraintManager = null) 40IEnumerable<Func<ITemplateInfo, MatchInfo?>> templateFilters = 47templateFilters = 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. 160internal 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. 166internal 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. 172internal IEnumerable<ITemplateInfo> TemplatesWithMatchingParametersForPreferredLanguage 194IEnumerable<Func<ITemplateInfo, MatchInfo?>> templateInfoFilters, 195Func<ITemplateInfo, IEnumerable<MatchInfo>>? templateParametersFilter = null) 245internal (ITemplateInfo Template, IReadOnlyDictionary<string, string?> Parameters)? GetTemplateToInvoke() 286internal IEnumerable<ITemplateInfo> GetHighestPrecedenceTemplates()
TemplateResolution\TemplateResolutionResult.cs (3)
25private (ITemplateInfo Template, IReadOnlyDictionary<string, string?> Parameters)? _templateToInvoke; 122internal (ITemplateInfo Template, IReadOnlyDictionary<string, string?> Parameters)? TemplateToInvoke 342IEnumerable<ITemplateInfo> highestPrecedenceTemplates = _unambiguousTemplateGroup.GetHighestPrecedenceTemplates();
TemplateSearch\CliSearchFiltersFactory.cs (4)
49internal static Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> GetMatchingTemplatesFilter(SearchCommandArgs commandArgs) 61IEnumerable<Func<ITemplateInfo, MatchInfo?>> templateFilters = 106hostSpecificData[((ITemplateInfo)templateData).Identity] = hostData; 112public HostSpecificTemplateData ReadHostSpecificTemplateData(ITemplateInfo templateInfo)
TemplateSearch\CliTemplateSearchCoordinator.cs (6)
111internal static async Task<(NugetPackageMetadata?, IReadOnlyList<ITemplateInfo>)> SearchForPackageDetailsAsync( 129return (null, new List<ITemplateInfo>()); 132internal static async Task<IReadOnlyList<ITemplateInfo>> SearchForPackageTemplatesAsync( 150return new List<ITemplateInfo>(); 175IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)> results, 228IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)> results,
Microsoft.TemplateEngine.Edge (69)
FilterableTemplateInfo.cs (3)
15private readonly ITemplateInfo _source; 19private FilterableTemplateInfo(ITemplateInfo source) 81public static FilterableTemplateInfo FromITemplateInfo(ITemplateInfo source)
Settings\FilteredTemplateInfo.cs (2)
12public FilteredTemplateInfo(ITemplateInfo info, IReadOnlyList<MatchInfo> matchDisposition) 18public 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)
144string ITemplateInfo.ShortName 164IReadOnlyDictionary<string, ICacheTag> ITemplateInfo.Tags 188IReadOnlyDictionary<string, ICacheParameter> ITemplateInfo.CacheParameters 232bool ITemplateInfo.HasScriptRunningPostActions { get; set; }
Settings\TemplateInfoReader.cs (1)
55JsonObject? baselineJObject = entry.Get<JsonObject>(nameof(ITemplateInfo.BaselineInfo));
Settings\TemplateMatchInfo.cs (6)
16public TemplateMatchInfoEx(ITemplateInfo info, IReadOnlyList<MatchInfo> matchDispositions) 28public TemplateMatchInfoEx(ITemplateInfo info) 35public ITemplateInfo Info { get; } 67internal TemplateMatchInfo(ITemplateInfo info, IReadOnlyList<Abstractions.TemplateFiltering.MatchInfo> matchDispositions) 79internal TemplateMatchInfo(ITemplateInfo info) 84public ITemplateInfo Info { get; }
Settings\TemplatePackageManager.cs (8)
154public async Task<IReadOnlyList<ITemplateInfo>> GetTemplatesAsync(CancellationToken cancellationToken) 172public async Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(Func<ITemplateMatchInfo, bool> matchFilter, IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, CancellationToken cancellationToken) 175IReadOnlyList<ITemplateInfo> templates = await GetTemplatesAsync(cancellationToken).ConfigureAwait(false); 195public async Task<ITemplatePackage> GetTemplatePackageAsync(ITemplateInfo template, CancellationToken cancellationToken) 203/// Returns all <see cref="ITemplateInfo"/> contained by <paramref name="templatePackage"/>. 208public 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"/>. 223public async Task<(IManagedTemplatePackage? Package, IEnumerable<ITemplateInfo>? Templates)> GetManagedTemplatePackageAsync(string packageIdentifier, string? packageVersion = null, CancellationToken cancellationToken = default)
Template\IFilteredTemplateInfo.cs (1)
11ITemplateInfo Info { get; }
Template\InputDataSet.cs (3)
33public InputDataSet(ITemplateInfo templateInfo) 43public InputDataSet(ITemplateInfo templateInfo, IReadOnlyDictionary<string, string?> inputParameters) 47private 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)
12ITemplateInfo Info { get; }
Template\TemplateCreator.cs (9)
40ITemplateInfo templateInfo, 77ITemplateInfo templateInfo, 234/// Fully load template from <see cref="ITemplateInfo"/>. 235/// <see cref="ITemplateInfo"/> usually comes from cache and is missing some information. 242internal Task<ITemplate?> LoadTemplateAsync(ITemplateInfo info, string? baselineName, CancellationToken cancellationToken) 263private 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. 459public ITemplate? LoadTemplate(ITemplateInfo info, string? baselineName)
Template\TemplateEqualityComparer.cs (5)
9public class TemplateEqualityComparer : IEqualityComparer<ITemplateInfo> 11public static IEqualityComparer<ITemplateInfo> Default { get; } = new TemplateEqualityComparer(); 13public bool Equals(ITemplateInfo x, ITemplateInfo y) 18public int GetHashCode(ITemplateInfo obj)
Template\WellKnownSearchFilters.cs (7)
12public static Func<ITemplateInfo, MatchInfo?> NameFilter(string name) 57public static Func<ITemplateInfo, MatchInfo?> ContextFilter(string inputContext) 86public static Func<ITemplateInfo, MatchInfo?> TagFilter(string tagFilter) 105public static Func<ITemplateInfo, MatchInfo?> LanguageFilter(string language) 125public static Func<ITemplateInfo, MatchInfo?> BaselineFilter(string baselineName) 146public static Func<ITemplateInfo, MatchInfo?> ClassificationsFilter(string name) 191public static Func<ITemplateInfo, MatchInfo?> AuthorFilter(string author)
TemplateConstraintManager.cs (5)
40public async Task<IReadOnlyList<ITemplateConstraint>> GetConstraintsAsync(IEnumerable<ITemplateInfo>? templates = null, CancellationToken cancellationToken = default) 146public async Task<IReadOnlyList<(ITemplateInfo Template, IReadOnlyList<TemplateConstraintResult> Result)>> EvaluateConstraintsAsync(IEnumerable<ITemplateInfo> templates, CancellationToken cancellationToken) 182List<(ITemplateInfo, IReadOnlyList<TemplateConstraintResult>)> evaluationResult = new(); 183foreach (ITemplateInfo template in templates)
TemplateListFilter.cs (12)
27public static IReadOnlyCollection<IFilteredTemplateInfo> FilterTemplates(IReadOnlyList<ITemplateInfo> templateList, bool exactMatchesOnly, params Func<ITemplateInfo, MatchInfo?>[] filters) 31foreach (ITemplateInfo template in templateList) 35foreach (Func<ITemplateInfo, MatchInfo?> filter in filters) 72public static IReadOnlyCollection<ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<ITemplateInfo> templateList, Func<ITemplateMatchInfo, bool> matchFilter, params Func<ITemplateInfo, MatchInfo?>[] filters) 76foreach (ITemplateInfo template in templateList) 80foreach (Func<ITemplateInfo, MatchInfo?> filter in filters) 106public static IReadOnlyCollection<Abstractions.TemplateFiltering.ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<ITemplateInfo> templateList, Func<Abstractions.TemplateFiltering.ITemplateMatchInfo, bool> matchFilter, params Func<ITemplateInfo, Abstractions.TemplateFiltering.MatchInfo?>[] filters) 110foreach (ITemplateInfo template in templateList) 114foreach (Func<ITemplateInfo, Abstractions.TemplateFiltering.MatchInfo?> filter in filters)
Microsoft.TemplateEngine.IDE (8)
Bootstrapper.cs (8)
102public Task<IReadOnlyList<ITemplateInfo>> GetTemplatesAsync(CancellationToken cancellationToken) 116public Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, bool exactMatchesOnly = true, CancellationToken cancellationToken = default) 145ITemplateInfo info, 178ITemplateInfo info, 210ITemplateInfo info, 365public async Task<IReadOnlyCollection<Edge.Template.IFilteredTemplateInfo>> ListTemplates(bool exactMatchesOnly, params Func<ITemplateInfo, Edge.Template.MatchInfo?>[] filters) 452public async Task<ICreationResult?> CreateAsync(ITemplateInfo info, string name, string outputPath, IReadOnlyDictionary<string, string?> parameters, bool skipUpdateCheck, string baselineName) 459public 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> 18public static ITemplateInfo ToITemplateInfo(this IScanTemplateInfo templateInfo, string? locFilePath = null, string? hostFilePath = null) => new LegacyTemplateInfo(templateInfo, locFilePath, hostFilePath);
TemplateInfoExtensions.cs (5)
19public static string? GetLanguage(this ITemplateInfo template) 30public static string? GetTemplateType(this ITemplateInfo template) 41public static string? GetTagValue(this ITemplateInfo template, string tagName) 56public static ITemplateParameter? GetParameter(this ITemplateInfo template, string parameterName) 68public 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. 37public 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/> 88public static Func<ITemplateInfo, MatchInfo?> TypeFilter(string? inputType) 116public 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/> 139public static Func<ITemplateInfo, MatchInfo?> LanguageFilter(string? language) 166public static Func<ITemplateInfo, MatchInfo?> BaselineFilter(string? baselineName) 195public static Func<ITemplateInfo, MatchInfo?> AuthorFilter(string? author) 233public static IEnumerable<Func<ITemplateInfo, MatchInfo?>> ConstraintFilters(IEnumerable<ITemplateConstraint> constraintDefinitions)
Microsoft.TemplateSearch.Common (39)
Abstractions\ITemplateSearchProvider.cs (2)
25Task<IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)>> SearchForTemplatePackagesAsync( 27Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> matchingTemplatesFilter,
Abstractions\TemplateSearchData.cs (6)
16public TemplateSearchData(ITemplateInfo templateInfo, IDictionary<string, object>? data = null) 83string ITemplateInfo.ShortName => TemplateInfo.ShortName; 86IReadOnlyDictionary<string, ICacheTag> ITemplateInfo.Tags => TemplateInfo.Tags; 89IReadOnlyDictionary<string, ICacheParameter> ITemplateInfo.CacheParameters => TemplateInfo.CacheParameters; 102bool ITemplateInfo.HasScriptRunningPostActions { get => TemplateInfo.HasScriptRunningPostActions; set => throw new NotImplementedException(); } 109private ITemplateInfo TemplateInfo { get; }
Providers\NuGetMetadataSearchProvider.cs (4)
62public async Task<IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)>> SearchForTemplatePackagesAsync( 64Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> matchingTemplatesFilter, 80List<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)> matchingTemplates = filteredPackages 81.Select<TemplatePackageSearchData, (ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)>(package => (package, matchingTemplatesFilter(package)))
SearchResult.cs (2)
18IReadOnlyList<(ITemplatePackageInfo, IReadOnlyList<ITemplateInfo>)>? hits = null) 52public IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)> SearchHits { get; }
TemplateDiscoveryMetadata\BlobStorageTemplateInfo.cs (4)
17public BlobStorageTemplateInfo(ITemplateInfo templateInfo) 109string ITemplateInfo.ShortName => ShortNameList.Count > 0 ? ShortNameList[0] : string.Empty; 139bool ITemplateInfo.HasScriptRunningPostActions { get; set; } 178JsonObject? baselineJObject = entry.Get<JsonObject>(nameof(ITemplateInfo.BaselineInfo));
TemplateDiscoveryMetadata\LegacySearchCacheReader.cs (5)
24var foundTemplate = discoveryMetadata.TemplateCache.FirstOrDefault(t => t.Identity.Equals(template.Identity, StringComparison.OrdinalIgnoreCase)); 70&& TryReadTemplateList(logger, cacheObject, out IReadOnlyList<ITemplateInfo>? templateList) 98out IReadOnlyList<ITemplateInfo>? templateList) 106List<ITemplateInfo> buildingTemplateList = new List<ITemplateInfo>();
TemplateDiscoveryMetadata\TemplateDiscoveryMetadata.cs (2)
17internal TemplateDiscoveryMetadata(string version, IReadOnlyList<ITemplateInfo> templateCache, IReadOnlyDictionary<string, PackToTemplateEntry> packToTemplateMap, IReadOnlyDictionary<string, object> additionalData) 29internal IReadOnlyList<ITemplateInfo> TemplateCache { get; }
TemplateSearchCache\TemplateSearchData.Json.cs (13)
57writer.WritePropertyName(nameof(ITemplateInfo.Identity)); 61writer.WritePropertyName(nameof(ITemplateInfo.GroupIdentity)); 66writer.WritePropertyName(nameof(ITemplateInfo.Precedence)); 69writer.WritePropertyName(nameof(ITemplateInfo.Name)); 71writer.WritePropertyName(nameof(ITemplateInfo.ShortNameList)); 83writer.WritePropertyName(nameof(ITemplateInfo.Author)); 88writer.WritePropertyName(nameof(ITemplateInfo.Description)); 93writer.WritePropertyName(nameof(ITemplateInfo.ThirdPartyNotices)); 99writer.WritePropertyName(nameof(ITemplateInfo.Classifications)); 113writer.WritePropertyName(nameof(ITemplateInfo.TagsCollection)); 126writer.WritePropertyName(nameof(ITemplateInfo.Parameters)); 179writer.WritePropertyName(nameof(ITemplateInfo.BaselineInfo)); 185writer.WritePropertyName(nameof(ITemplateInfo.PostActions));
TemplateSearchCoordinator.cs (1)
41Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> matchingTemplatesFilter,