1 implementation of ITemplateMatchInfo
Microsoft.TemplateEngine.Edge (1)
Settings\TemplateMatchInfo.cs (1)
63internal class TemplateMatchInfo : Abstractions.TemplateFiltering.ITemplateMatchInfo
71 references to ITemplateMatchInfo
Microsoft.TemplateEngine.Cli (30)
TemplateResolution\TemplateGroupMatchInfo.cs (25)
23private readonly IReadOnlyList<ITemplateMatchInfo> _templateMatchInfos; 30IEnumerable<ITemplateMatchInfo> templateDispositions, 73/// Returns the list of <see cref="ITemplateMatchInfo"></see> for all templates in the group. 75internal IEnumerable<ITemplateMatchInfo> TemplateMatchInfos 85return Array.Empty<ITemplateMatchInfo>(); 92/// Returns the list of <see cref="ITemplateMatchInfo"></see> for all templates that matches template info filters. 94internal IEnumerable<ITemplateMatchInfo> TemplateMatchInfosWithMatchingInfo 104return Array.Empty<ITemplateMatchInfo>(); 111/// Returns the list of <see cref="ITemplateMatchInfo"></see> for all templates that matches template info filters and template options filters. 113internal IEnumerable<ITemplateMatchInfo> TemplateMatchInfosWithMatchingParameters 127return Array.Empty<ITemplateMatchInfo>(); 134/// Returns the list of <see cref="ITemplateMatchInfo"></see> for all templates of preferred language that matches template info filters, template options filters. 136internal IEnumerable<ITemplateMatchInfo> TemplateMatchInfosWithMatchingParametersForPreferredLanguage 150return Array.Empty<ITemplateMatchInfo>(); 213Array.Empty<ITemplateMatchInfo>(), 218IReadOnlyCollection<ITemplateMatchInfo> templateMatchDispositions = TemplateListFilter.GetTemplateMatchInfo(group.Templates, x => true, templateInfoFilters.ToArray()); 231foreach (var template in templateMatchDispositions) 267foreach (ITemplateMatchInfo template in _templateMatchInfos) 291private static bool TemplateInfoMatch(ITemplateMatchInfo templateMatchInfo) 298private static bool TemplateParametersMatch(ITemplateMatchInfo templateMatchInfo) 305private IEnumerable<ITemplateMatchInfo> GetHighestPrecedenceTemplateMatchInfos() 309return new List<ITemplateMatchInfo>(); 312IEnumerable<ITemplateMatchInfo> templatesToCheck = FilterTemplatesByPreferredLanguage(TemplateMatchInfosWithMatchingParameters); 318private IEnumerable<ITemplateMatchInfo> FilterTemplatesByPreferredLanguage(IEnumerable<ITemplateMatchInfo> templatesToFilter)
TemplateResolution\TemplateMatchInfoExtensions.cs (4)
12internal static IReadOnlyDictionary<string, string?> GetValidTemplateParameters(this ITemplateMatchInfo templateMatchInfo) 20internal static IEnumerable<string> GetInvalidParameterNames(this ITemplateMatchInfo templateMatchInfo) 28internal static bool HasMismatchOnConstraints(this ITemplateMatchInfo templateMatchInfo) 45internal static bool HasMismatchOnListFilters(this ITemplateMatchInfo templateMatchInfo)
TemplateResolution\TemplateResolutionResult.cs (1)
261internal static IReadOnlyDictionary<string, string?> GetAllMatchedParametersList(IEnumerable<ITemplateMatchInfo> templateMatchInfos)
Microsoft.TemplateEngine.Edge (13)
Settings\TemplatePackageManager.cs (3)
164/// <param name="matchFilter">The criteria for <see cref="ITemplateMatchInfo"/> to be included to result collection.</param> 172public async Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(Func<ITemplateMatchInfo, bool> matchFilter, IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, CancellationToken cancellationToken)
TemplateListFilter.cs (10)
106public static IReadOnlyCollection<Abstractions.TemplateFiltering.ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<ITemplateInfo> templateList, Func<Abstractions.TemplateFiltering.ITemplateMatchInfo, bool> matchFilter, params Func<ITemplateInfo, Abstractions.TemplateFiltering.MatchInfo?>[] filters) 108HashSet<Abstractions.TemplateFiltering.ITemplateMatchInfo> matchingTemplates = new HashSet<Abstractions.TemplateFiltering.ITemplateMatchInfo>(TemplateMatchInfoEqualityComparer.Default); 123Abstractions.TemplateFiltering.ITemplateMatchInfo info = new TemplateMatchInfo(template, matchInformation); 137private class TemplateMatchInfoEqualityComparer : IEqualityComparer<Abstractions.TemplateFiltering.ITemplateMatchInfo> 139internal static IEqualityComparer<Abstractions.TemplateFiltering.ITemplateMatchInfo> Default { get; } = new TemplateMatchInfoEqualityComparer(); 141public bool Equals(Abstractions.TemplateFiltering.ITemplateMatchInfo x, Abstractions.TemplateFiltering.ITemplateMatchInfo y) 146public int GetHashCode(Abstractions.TemplateFiltering.ITemplateMatchInfo obj)
Microsoft.TemplateEngine.IDE (3)
Bootstrapper.cs (3)
15using ITemplateMatchInfo = Microsoft.TemplateEngine.Abstractions.TemplateFiltering.ITemplateMatchInfo; 116public Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, bool exactMatchesOnly = true, CancellationToken cancellationToken = default) 118Func<ITemplateMatchInfo, bool> criteria;
Microsoft.TemplateEngine.Utils (25)
TemplateMatchInfoExtensions.cs (21)
9/// Set of useful extensions when working with <see cref="ITemplateMatchInfo"/>. 16public static bool HasNameMatch(this ITemplateMatchInfo templateMatchInfo) 24public static bool HasNameExactMatch(this ITemplateMatchInfo templateMatchInfo) 32public static bool HasNamePartialMatch(this ITemplateMatchInfo templateMatchInfo) 40public static bool HasNameMismatch(this ITemplateMatchInfo templateMatchInfo) 48public static bool HasShortNameMatch(this ITemplateMatchInfo templateMatchInfo) 56public static bool HasShortNameExactMatch(this ITemplateMatchInfo templateMatchInfo) 64public static bool HasShortNamePartialMatch(this ITemplateMatchInfo templateMatchInfo) 72public static bool HasShortNameMismatch(this ITemplateMatchInfo templateMatchInfo) 80public static bool HasTypeMatch(this ITemplateMatchInfo templateMatchInfo) 88public static bool HasTypeMismatch(this ITemplateMatchInfo templateMatchInfo) 96public static bool HasClassificationMatch(this ITemplateMatchInfo templateMatchInfo) 104public static bool HasClassificationMismatch(this ITemplateMatchInfo templateMatchInfo) 112public static bool HasLanguageMatch(this ITemplateMatchInfo templateMatchInfo) 120public static bool HasLanguageMismatch(this ITemplateMatchInfo templateMatchInfo) 128public static bool HasBaselineMatch(this ITemplateMatchInfo templateMatchInfo) 136public static bool HasBaselineMismatch(this ITemplateMatchInfo templateMatchInfo) 144public static bool HasAuthorMatch(this ITemplateMatchInfo templateMatchInfo) 152public static bool HasAuthorExactMatch(this ITemplateMatchInfo templateMatchInfo) 160public static bool HasAuthorPartialMatch(this ITemplateMatchInfo templateMatchInfo) 168public static bool HasAuthorMismatch(this ITemplateMatchInfo templateMatchInfo)
WellKnownSearchFilters.cs (4)
16/// The template should match all filters: <see cref="ITemplateMatchInfo.MatchDisposition"/> should have all dispositions of <see cref="MatchKind.Exact"/> or <see cref="MatchKind.Partial"/>. 18public static Func<ITemplateMatchInfo, bool> MatchesAllCriteria => 22/// The template should match at least one filter: <see cref="ITemplateMatchInfo.MatchDisposition"/> should have at least one disposition of <see cref="MatchKind.Exact"/> or <see cref="MatchKind.Partial"/>. 24public static Func<ITemplateMatchInfo, bool> MatchesAtLeastOneCriteria =>