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