97 references to TerminalHostPaths
Aspire.Hosting (31)
Lifecycle\TerminalHostOrphanCleanupService.cs (19)
64
var trmnlDirectory = configuration[
TerminalHostPaths
.DirectoryOverrideConfigName];
68
trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(homeDirectory);
161
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ProducerSockPurpose),
162
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ConsumerSockPurpose),
163
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ControlSockPurpose),
188
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
239
foreach (var candidatePath in Directory.GetFiles(trmnlDirectory, $"*.{
TerminalHostPaths
.MetadataSuffix}"))
243
if (!
TerminalHostPaths
.TryGetReplicaIdFromMetadataPath(candidatePath, out var replicaId))
440
foreach (var temporaryPath in Directory.GetFiles(trmnlDirectory, $"*.{
TerminalHostPaths
.MetadataTemporarySuffix}"))
444
if (!
TerminalHostPaths
.TryGetReplicaIdFromMetadataTemporaryPath(temporaryPath, out var replicaId))
481
=> File.Exists(
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ProducerSockPurpose))
482
|| File.Exists(
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ConsumerSockPurpose))
483
|| File.Exists(
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ControlSockPurpose));
src\Shared\TerminalHost\TerminalHostMetadata.cs (1)
39
/// <summary>The replica id (see <see cref="
TerminalHostPaths
.CreateReplicaId"/>).</summary>
TerminalResourceBuilderExtensions.cs (11)
181
var trmnlDirectory = configuration[
TerminalHostPaths
.DirectoryOverrideConfigName];
185
trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(homeDirectory);
219
var replicaId =
TerminalHostPaths
.CreateReplicaId();
319
var temporaryMetadataPath =
TerminalHostPaths
.GetMetadataTemporaryPath(metadataPath);
448
var producerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ProducerSockPurpose);
449
var consumerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ConsumerSockPurpose);
450
var controlPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ControlSockPurpose);
451
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
Aspire.Hosting.Tests (66)
TerminalHostPathsTests.cs (21)
15
var id =
TerminalHostPaths
.CreateReplicaId();
17
Assert.Equal(
TerminalHostPaths
.ReplicaIdLength, id.Length);
25
.Select(_ =>
TerminalHostPaths
.CreateReplicaId())
34
var trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(ExampleHome);
35
var id =
TerminalHostPaths
.CreateReplicaId();
36
var control =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, id,
TerminalHostPaths
.ControlSockPurpose);
38
Assert.Equal(Path.Combine(trmnlDirectory, $"{id}.{
TerminalHostPaths
.ControlSockPurpose}.sock"), control);
44
var trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(ExampleHome);
45
var id =
TerminalHostPaths
.CreateReplicaId();
46
var metadata =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, id);
48
Assert.Equal(Path.Combine(trmnlDirectory, $"{id}.{
TerminalHostPaths
.MetadataSuffix}"), metadata);
54
var trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(ExampleHome);
55
var id =
TerminalHostPaths
.CreateReplicaId();
56
var metadata =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, id);
59
Path.Combine(trmnlDirectory, $"{id}.{
TerminalHostPaths
.MetadataTemporarySuffix}"),
60
TerminalHostPaths
.GetMetadataTemporaryPath(metadata));
67
var trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(home);
68
var id =
TerminalHostPaths
.CreateReplicaId();
69
var control =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, id,
TerminalHostPaths
.ControlSockPurpose);
WithTerminalTests.cs (45)
405
Assert.False(File.Exists(
TerminalHostPaths
.GetMetadataTemporaryPath(host.Layout.MetadataPath)));
434
var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.MetadataSuffix}");
435
var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
436
var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ConsumerSockPurpose}.sock");
437
var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ControlSockPurpose}.sock");
489
var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.MetadataSuffix}");
490
var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
540
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
541
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
572
var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
573
var producerPath =
TerminalHostPaths
.GetSocketPath(
576
TerminalHostPaths
.ProducerSockPurpose);
612
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
613
var producerPath =
TerminalHostPaths
.GetSocketPath(
616
TerminalHostPaths
.ProducerSockPurpose);
638
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
639
var producerPath =
TerminalHostPaths
.GetSocketPath(
642
TerminalHostPaths
.ProducerSockPurpose);
660
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
677
var expiredPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
678
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, expiredReplicaId));
679
var recentPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
680
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, recentReplicaId));
707
var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
708
var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
737
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
738
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
770
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
771
var producerPath =
TerminalHostPaths
.GetSocketPath(
774
TerminalHostPaths
.ProducerSockPurpose);
796
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
797
var producerPath =
TerminalHostPaths
.GetSocketPath(
800
TerminalHostPaths
.ProducerSockPurpose);
822
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
823
var producerPath =
TerminalHostPaths
.GetSocketPath(
826
TerminalHostPaths
.ProducerSockPurpose);
851
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
852
var producerPath =
TerminalHostPaths
.GetSocketPath(
855
TerminalHostPaths
.ProducerSockPurpose);
880
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
881
var producerPath =
TerminalHostPaths
.GetSocketPath(
884
TerminalHostPaths
.ProducerSockPurpose);
921
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = publishDirectory;
995
=>
TerminalHostPaths
.CreateReplicaId();
1327
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;