99 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)
180
var trmnlDirectory = configuration[
TerminalHostPaths
.DirectoryOverrideConfigName];
185
trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(homeDirectory);
202
var replicaId =
TerminalHostPaths
.CreateReplicaId();
288
var temporaryMetadataPath =
TerminalHostPaths
.GetMetadataTemporaryPath(metadataPath);
421
var producerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ProducerSockPurpose);
422
var consumerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ConsumerSockPurpose);
423
var controlPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ControlSockPurpose);
424
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
Aspire.Hosting.Tests (68)
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);
Terminals\ResourceTerminalCatalogTests.cs (1)
273
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;
WithTerminalTests.cs (46)
482
Assert.False(File.Exists(
TerminalHostPaths
.GetMetadataTemporaryPath(host.Layout.MetadataPath)));
513
var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.MetadataSuffix}");
514
var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
515
var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ConsumerSockPurpose}.sock");
516
var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ControlSockPurpose}.sock");
568
var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.MetadataSuffix}");
569
var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
619
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
620
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
651
var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
652
var producerPath =
TerminalHostPaths
.GetSocketPath(
655
TerminalHostPaths
.ProducerSockPurpose);
691
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
692
var producerPath =
TerminalHostPaths
.GetSocketPath(
695
TerminalHostPaths
.ProducerSockPurpose);
717
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
718
var producerPath =
TerminalHostPaths
.GetSocketPath(
721
TerminalHostPaths
.ProducerSockPurpose);
739
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
756
var expiredPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
757
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, expiredReplicaId));
758
var recentPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
759
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, recentReplicaId));
786
var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
787
var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
816
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
817
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
849
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
850
var producerPath =
TerminalHostPaths
.GetSocketPath(
853
TerminalHostPaths
.ProducerSockPurpose);
875
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
876
var producerPath =
TerminalHostPaths
.GetSocketPath(
879
TerminalHostPaths
.ProducerSockPurpose);
901
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
902
var producerPath =
TerminalHostPaths
.GetSocketPath(
905
TerminalHostPaths
.ProducerSockPurpose);
930
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
931
var producerPath =
TerminalHostPaths
.GetSocketPath(
934
TerminalHostPaths
.ProducerSockPurpose);
959
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
960
var producerPath =
TerminalHostPaths
.GetSocketPath(
963
TerminalHostPaths
.ProducerSockPurpose);
1000
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = publishDirectory;
1074
=>
TerminalHostPaths
.CreateReplicaId();
1395
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = directory;
1448
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;