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