67 references to PipelineOutputRoot
Aspire.Hosting (17)
Pipelines\DefaultPipelineOutputComparer.cs (2)
33
var paths = before.Keys.Union(after.Keys,
PipelineOutputRoot
.PathComparer).Order(
PipelineOutputRoot
.PathComparer);
Pipelines\DefaultPipelineOutputSnapshotter.cs (3)
20
private readonly Matcher _matcher = new(
PipelineOutputRoot
.PathComparison, preserveFilterOrder: true);
51
var directory =
PipelineOutputRoot
.NormalizeDirectoryPath(outputDirectory);
55
return new(directory, new Dictionary<string, PipelineOutputFileSnapshot>(
PipelineOutputRoot
.PathComparer));
Pipelines\GitPipelineOutputReader.cs (5)
84
var scope = string.Equals(directory, Path.TrimEndingDirectorySeparator(repositoryRoot),
PipelineOutputRoot
.PathComparison) ? ":/" :
87
var candidates = new HashSet<string>(index.Keys,
PipelineOutputRoot
.PathComparer);
89
var relative = candidates.Where(path =>
PipelineOutputRoot
.IsWithinDirectory(directory, path))
127
var index = new Dictionary<string, IndexEntry?>(
PipelineOutputRoot
.PathComparer);
182
var working = new Dictionary<string, StatusEntry>(
PipelineOutputRoot
.PathComparer);
Pipelines\GitPipelineOutputSnapshotter.cs (1)
18
var files = new Dictionary<string, PipelineOutputFileSnapshot>(entries.Count,
PipelineOutputRoot
.PathComparer);
Pipelines\PipelineOutputSnapshotter.cs (6)
30
var directory =
PipelineOutputRoot
.NormalizeDirectoryPath(outputDirectory);
31
var matcher = new Matcher(
PipelineOutputRoot
.PathComparison, preserveFilterOrder: true);
35
return new Dictionary<string, PipelineOutputFileSnapshot>(
PipelineOutputRoot
.PathComparer);
63
.Select(match => Path.GetFullPath(match.Path, directory)).Where(path =>
PipelineOutputRoot
.IsWithinDirectory(directory, path))
96
var snapshots = new Dictionary<string, PipelineOutputFileSnapshot>(
PipelineOutputRoot
.PathComparer);
97
var uniqueFiles = files.DistinctBy(file => file.FullName,
PipelineOutputRoot
.PathComparer).ToArray();
Aspire.Hosting.Tests (50)
Pipelines\PipelineOutputComparisonTests.cs (2)
31
Assert.Equal(new[] { changed, removed, unchanged }, before.Files.Keys.Order(
PipelineOutputRoot
.PathComparer));
38
Assert.Equal(new[] { added, changed, unchanged }, after.Files.Keys.Order(
PipelineOutputRoot
.PathComparer));
Pipelines\PipelineOutputGitFingerprintTests.cs (1)
588
Assert.True(string.Equals(Path.GetRelativePath(requested, path), change.Path,
PipelineOutputRoot
.PathComparison));
Pipelines\PipelineOutputGitTestHelper.cs (1)
15
var matcher = new Matcher(
PipelineOutputRoot
.PathComparison, preserveFilterOrder: true);
Pipelines\PipelineOutputSelectionTests.cs (18)
46
Assert.Equal(mode is not PipelineOutputDiffMode.FileSystem ? new[] { readme } : new[] { readme, model }, selected.Order(
PipelineOutputRoot
.PathComparer));
152
Assert.Equal((mode is not PipelineOutputDiffMode.FileSystem ? new[] { json, source, tracked } : new[] { ignored, json, source, tracked }).Order(
PipelineOutputRoot
.PathComparer), selected.Order(
PipelineOutputRoot
.PathComparer));
329
Assert.False(
PipelineOutputRoot
.IsWithinDirectory(worktree, root));
441
Assert.Equal(new[] { special, artifact }, selected.Order(
PipelineOutputRoot
.PathComparer));
539
Assert.Equal(expected, paths.Order(
PipelineOutputRoot
.PathComparer));
558
Assert.Equal(paths.Order(
PipelineOutputRoot
.PathComparer), selected.Order(
PipelineOutputRoot
.PathComparer));
583
Assert.Equal(expected.Order(
PipelineOutputRoot
.PathComparer), selected.Order(
PipelineOutputRoot
.PathComparer));
600
Assert.Equal(new[] { artifact, visible }, (await git.SelectFilesAsync(root, PipelineOutputGitTestHelper.AllFilesMatcher(), TestContext.Current.CancellationToken)).Select(entry => entry.File.FullName).Order(
PipelineOutputRoot
.PathComparer));
617
Assert.Equal(replaceWithLink ? new[] { artifact, visible } : new[] { visible }, selected.Order(
PipelineOutputRoot
.PathComparer));
662
Assert.Equal(new[] { link }, (await snapshotter.CaptureAsync(root, TestContext.Current.CancellationToken)).Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
666
Assert.Equal(new[] { link }, (await snapshotter.CaptureAsync(root, TestContext.Current.CancellationToken)).Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
755
Assert.Equal(new[] { tracked, direct, visible }.Order(
PipelineOutputRoot
.PathComparer),
756
(await SelectAsync(new(), root)).Order(
PipelineOutputRoot
.PathComparer));
764
Assert.Equal(new[] { tracked, direct }.Select(path => Path.GetRelativePath(root, path)).Order(
PipelineOutputRoot
.PathComparer), changes.Select(change => change.Path));
903
return (await snapshotter.CaptureAsync(directory, TestContext.Current.CancellationToken)).Files.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray();
Pipelines\PipelineOutputSnapshotterTests.cs (24)
28
Assert.Equal(new[] { changed, removed, unchanged }, before.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
90
Assert.All(expected.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray(), path => Assert.Equal(length, new FileInfo(path).Length));
94
Assert.Equal(expected.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray(), actual.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
95
Assert.All(expected.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray(), path =>
140
Assert.Equal(new[] { first, second }, calls.Order(
PipelineOutputRoot
.PathComparer).ToArray());
248
Assert.Empty(before.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
249
Assert.Empty(after.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
299
Assert.Equal(new[] { first, second }, before.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
337
var buffers = new ConcurrentDictionary<string, byte[]>(
PipelineOutputRoot
.PathComparer);
339
path => XxHash3.Hash(File.ReadAllBytes(path)).AsSpan(0, length).ToArray(),
PipelineOutputRoot
.PathComparer);
357
Assert.Equal(new[] { first, second }, capture.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
414
Assert.Single((await snapshotter.CaptureAsync(root, cts.Token)).Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
452
Assert.Equal(new[] { gitPath, path }, capture.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
477
Assert.Equal(new[] { link }, before.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
488
Assert.Equal(new[] { link }, cyclic.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
511
Assert.Equal(new[] { link }, before.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
595
var selected = new[] { directoryLink, fileLink, regular }.Order(
PipelineOutputRoot
.PathComparer).ToArray();
596
Assert.Equal(selected, calls.Order(
PipelineOutputRoot
.PathComparer).ToArray());
597
Assert.Equal(selected, capture.Keys.Order(
PipelineOutputRoot
.PathComparer).ToArray());
646
Assert.Equal(directory,
PipelineOutputRoot
.NormalizeDirectoryPath(path));
654
Assert.Equal(Directory.GetCurrentDirectory(),
PipelineOutputRoot
.NormalizeDirectoryPath("."));
663
Assert.Equal(root,
PipelineOutputRoot
.NormalizeDirectoryPath(root));
674
Assert.ThrowsAny<ArgumentException>(() =>
PipelineOutputRoot
.NormalizeDirectoryPath(path!));
Pipelines\PipelineOutputStrategyTests.cs (4)
54
Assert.Equal(new[] { artifact, metadata }.Order(
PipelineOutputRoot
.PathComparer), snapshot.Files.Keys.Order(
PipelineOutputRoot
.PathComparer));
66
Assert.Equal(new[] { artifact, metadata }.Order(
PipelineOutputRoot
.PathComparer), snapshot.Files.Keys.Order(
PipelineOutputRoot
.PathComparer));