2 types derived from ManifestEntry
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\ManifestDirectory.cs (1)
11
internal class ManifestDirectory :
ManifestEntry
Manifest\ManifestFile.cs (1)
10
internal sealed class ManifestFile :
ManifestEntry
42 references to ManifestEntry
Microsoft.Extensions.FileProviders.Embedded (32)
Manifest\EmbeddedFilesManifest.cs (3)
29
internal
ManifestEntry
? ResolveEntry(string path)
49
ManifestEntry
currentEntry = _rootDirectory;
79
if (ResolveEntry(path) is ManifestDirectory directory && directory !=
ManifestEntry
.UnknownPath)
Manifest\ManifestDirectory.cs (11)
13
protected ManifestDirectory(string name,
ManifestEntry
[] children)
21
public IReadOnlyList<
ManifestEntry
> Children { get; protected set; }
23
public override
ManifestEntry
Traverse(StringSegment segment)
35
foreach (
var
child in Children)
48
public static ManifestDirectory CreateDirectory(string name,
ManifestEntry
[] children)
59
public static ManifestRootDirectory CreateRootDirectory(
ManifestEntry
[] children)
69
internal static void ValidateChildrenAndSetParent(
ManifestEntry
[] children, ManifestDirectory parent)
71
foreach (
var
child in children)
87
private
ManifestEntry
[] CopyChildren()
89
var list = new List<
ManifestEntry
>(Children.Count);
92
var
child = Children[i];
Manifest\ManifestDirectoryInfo.cs (2)
55
if (Directory ==
ManifestEntry
.UnknownPath)
62
foreach (
var
entry in Directory.Children)
Manifest\ManifestEntry.cs (3)
16
public
ManifestEntry
? Parent { get; private set; }
20
public static
ManifestEntry
UnknownPath { get; } = ManifestSinkDirectory.Instance;
32
public abstract
ManifestEntry
Traverse(StringSegment segment);
Manifest\ManifestFile.cs (1)
23
public override
ManifestEntry
Traverse(StringSegment segment) => UnknownPath;
Manifest\ManifestParser.cs (5)
50
var entriesList = new List<
ManifestEntry
>();
53
var
entry = BuildEntry(element);
64
private static void ValidateEntries(List<
ManifestEntry
> entriesList)
80
private static
ManifestEntry
BuildEntry(XElement element)
100
var children = new List<
ManifestEntry
>();
Manifest\ManifestRootDirectory.cs (1)
8
public ManifestRootDirectory(
ManifestEntry
[] children)
Manifest\ManifestSinkDirectory.cs (2)
12
: base(name: string.Empty, children: Array.Empty<
ManifestEntry
>())
20
public override
ManifestEntry
Traverse(StringSegment segment) => this;
ManifestEmbeddedFileProvider.cs (4)
85
var
entry = Manifest.ResolveEntry(subpath);
86
if (entry == null || entry ==
ManifestEntry
.UnknownPath)
102
var
entry = Manifest.ResolveEntry(subpath);
109
case ManifestDirectory d when d !=
ManifestEntry
.UnknownPath:
Microsoft.Extensions.FileProviders.Embedded.Tests (10)
Manifest\EmbeddedFilesManifestTests.cs (2)
27
var
entry = manifest.ResolveEntry(path);
52
var
entry = manifest.ResolveEntry(path);
Manifest\ManifestEntryTests.cs (8)
18
var
result = file.Traverse(".");
31
var
result = directory.Traverse("missing.txt");
44
var
result = directory.Traverse(".");
58
var
result = childDirectory.Traverse("..");
71
var
result = directory.Traverse("..");
90
var
result = newRoot.Traverse("../b/test.txt");
104
var
directory = ManifestEntry.UnknownPath;
107
var
result = directory.Traverse(path);