7 instantiations of GlobNode
Microsoft.NET.Sdk.StaticWebAssets.Tasks (7)
Utils\Globbing\StaticWebAssetGlobMatcherBuilder.cs (7)
47var includeRoot = new GlobNode(); 53excludeRoot = new GlobNode(); 113literalNode = new GlobNode(); 134Node = new GlobNode(), 191extensionNode = new GlobNode(); 209current.RecursiveWildCard ??= new GlobNode(); 221current.WildCard ??= new GlobNode();
38 references to GlobNode
Microsoft.NET.Sdk.StaticWebAssets.Tasks (38)
Utils\Globbing\GlobNode.cs (7)
16public Dictionary<string, GlobNode> LiteralsDictionary { get; set; } 17public Dictionary<string, GlobNode>.AlternateLookup<ReadOnlySpan<char>> Literals { get; set; } 23public Dictionary<string, GlobNode> ExtensionsDictionary { get; set; } 24public Dictionary<string, GlobNode>.AlternateLookup<ReadOnlySpan<char>> Extensions { get; set; } 31public GlobNode WildCard { get; set; } 33public GlobNode RecursiveWildCard { get; set; } 85public GlobNode Node { get; set; }
Utils\Globbing\StaticWebAssetGlobMatcher.cs (20)
10public class StaticWebAssetGlobMatcher(GlobNode includes, GlobNode excludes) 42private static GlobMatch MatchCore(GlobNode includes, PathTokenizer.SegmentCollection segments, Stack<MatchState> stateStack) 50var node = state.Node; 164var node = state.Node; 270var node = state.Node; 293var node = state.Node; 308if (TryMatchExtension(node, remaining.Slice(indexOfDot), out var extensionCandidate)) 323var node = state.Node; 326if (TryMatchLiteral(node, segments[currentIndex], out var literalCandidate)) 346internal struct MatchState(GlobNode node, MatchStage stage, int segmentIndex, int extensionSegmentIndex, int complexSegmentIndex) 348public MatchState(GlobNode node) : this(node, GetInitialStage(node), 0, 0, 0) { } 350public GlobNode Node { get; set; } = node; 365public readonly void Deconstruct(out GlobNode node, out MatchStage stage, out int segmentIndex, out int extensionIndex, out int complexIndex) 374internal MatchState NextSegment(GlobNode candidate, int elements = 1, int complexIndex = 0) => 452private static MatchStage GetInitialStage(GlobNode node) 503private static bool TryMatchExtension(GlobNode node, ReadOnlySpan<char> extension, out GlobNode extensionCandidate) => 510private static bool TryMatchLiteral(GlobNode node, ReadOnlySpan<char> current, out GlobNode nextNode) =>
Utils\Globbing\StaticWebAssetGlobMatcherBuilder.cs (11)
47var includeRoot = new GlobNode(); 48GlobNode excludeRoot = null; 60private static void BuildTree(GlobNode root, List<string> patterns, List<ReadOnlyMemory<char>> segments) 79var current = root; 102private static bool TryAddLiteral(ReadOnlyMemory<char> segment, ref GlobNode current) 111if (!current.Literals.TryGetValue(literal, out var literalNode)) 125private static bool TryAddComplexSegment(ReadOnlyMemory<char> segment, ReadOnlySpan<char> segmentSpan, ref GlobNode current) 177private static bool TryAddExtension(ReadOnlyMemory<char> segment, ReadOnlySpan<char> segmentSpan, ref GlobNode current) 189if (!current.Extensions.TryGetValue(extension, out var extensionNode)) 205private static bool TryAddRecursiveWildCard(ReadOnlySpan<char> segmentSpan, ref GlobNode current) 217private static bool TryAddWildcard(ReadOnlySpan<char> segmentSpan, ref GlobNode current)