53 references to PathComparer
Aspire.Hosting (10)
Pipelines\DefaultPipelineOutputComparer.cs (2)
33
var paths = before.Keys.Union(after.Keys, PipelineOutputRoot.
PathComparer
).Order(PipelineOutputRoot.
PathComparer
);
Pipelines\DefaultPipelineOutputSnapshotter.cs (1)
55
return new(directory, new Dictionary<string, PipelineOutputFileSnapshot>(PipelineOutputRoot.
PathComparer
));
Pipelines\GitPipelineOutputReader.cs (3)
87
var candidates = new HashSet<string>(index.Keys, PipelineOutputRoot.
PathComparer
);
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 (3)
35
return new Dictionary<string, PipelineOutputFileSnapshot>(PipelineOutputRoot.
PathComparer
);
96
var snapshots = new Dictionary<string, PipelineOutputFileSnapshot>(PipelineOutputRoot.
PathComparer
);
97
var uniqueFiles = files.DistinctBy(file => file.FullName, PipelineOutputRoot.
PathComparer
).ToArray();
Aspire.Hosting.Tests (43)
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\PipelineOutputSelectionTests.cs (17)
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
));
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 (20)
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());
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
));