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)
182var trmnlDirectory = configuration[TerminalHostPaths.DirectoryOverrideConfigName]; 186trmnlDirectory = TerminalHostPaths.GetTrmnlDirectory(homeDirectory); 214var replicaId = TerminalHostPaths.CreateReplicaId(); 300var temporaryMetadataPath = TerminalHostPaths.GetMetadataTemporaryPath(metadataPath); 433var producerPath = TerminalHostPaths.GetSocketPath(trmnlDirectory, replicaId, TerminalHostPaths.ProducerSockPurpose); 434var consumerPath = TerminalHostPaths.GetSocketPath(trmnlDirectory, replicaId, TerminalHostPaths.ConsumerSockPurpose); 435var controlPath = TerminalHostPaths.GetSocketPath(trmnlDirectory, replicaId, TerminalHostPaths.ControlSockPurpose); 436var 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)
454Assert.False(File.Exists(TerminalHostPaths.GetMetadataTemporaryPath(host.Layout.MetadataPath))); 483var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.MetadataSuffix}"); 484var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ProducerSockPurpose}.sock"); 485var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ConsumerSockPurpose}.sock"); 486var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ControlSockPurpose}.sock"); 538var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.MetadataSuffix}"); 539var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.ProducerSockPurpose}.sock"); 589var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}"); 590var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock"); 621var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{TerminalHostPaths.MetadataSuffix}"); 622var producerPath = TerminalHostPaths.GetSocketPath( 625TerminalHostPaths.ProducerSockPurpose); 661var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 662var producerPath = TerminalHostPaths.GetSocketPath( 665TerminalHostPaths.ProducerSockPurpose); 687var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 688var producerPath = TerminalHostPaths.GetSocketPath( 691TerminalHostPaths.ProducerSockPurpose); 709var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 726var expiredPath = TerminalHostPaths.GetMetadataTemporaryPath( 727TerminalHostPaths.GetMetadataPath(trmnlDirectory, expiredReplicaId)); 728var recentPath = TerminalHostPaths.GetMetadataTemporaryPath( 729TerminalHostPaths.GetMetadataPath(trmnlDirectory, recentReplicaId)); 756var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.MetadataSuffix}"); 757var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock"); 786var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}"); 787var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock"); 819var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 820var producerPath = TerminalHostPaths.GetSocketPath( 823TerminalHostPaths.ProducerSockPurpose); 845var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 846var producerPath = TerminalHostPaths.GetSocketPath( 849TerminalHostPaths.ProducerSockPurpose); 871var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 872var producerPath = TerminalHostPaths.GetSocketPath( 875TerminalHostPaths.ProducerSockPurpose); 900var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 901var producerPath = TerminalHostPaths.GetSocketPath( 904TerminalHostPaths.ProducerSockPurpose); 929var metadataPath = TerminalHostPaths.GetMetadataPath(trmnlDirectory, replicaId); 930var producerPath = TerminalHostPaths.GetSocketPath( 933TerminalHostPaths.ProducerSockPurpose); 970builder.Configuration[TerminalHostPaths.DirectoryOverrideConfigName] = publishDirectory; 1044=> TerminalHostPaths.CreateReplicaId(); 1376builder.Configuration[TerminalHostPaths.DirectoryOverrideConfigName] = _terminalDirectory;