100 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)
187
var trmnlDirectory = configuration[
TerminalHostPaths
.DirectoryOverrideConfigName];
192
trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(homeDirectory);
210
var replicaId =
TerminalHostPaths
.CreateReplicaId();
295
var temporaryMetadataPath =
TerminalHostPaths
.GetMetadataTemporaryPath(metadataPath);
425
var producerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ProducerSockPurpose);
426
var consumerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ConsumerSockPurpose);
427
var controlPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ControlSockPurpose);
428
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
Aspire.Hosting.Tests (69)
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 (47)
544
Assert.False(File.Exists(
TerminalHostPaths
.GetMetadataTemporaryPath(host.Layout.MetadataPath)));
575
var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.MetadataSuffix}");
576
var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
577
var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ConsumerSockPurpose}.sock");
578
var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ControlSockPurpose}.sock");
630
var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.MetadataSuffix}");
631
var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
681
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
682
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
713
var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
714
var producerPath =
TerminalHostPaths
.GetSocketPath(
717
TerminalHostPaths
.ProducerSockPurpose);
753
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
754
var producerPath =
TerminalHostPaths
.GetSocketPath(
757
TerminalHostPaths
.ProducerSockPurpose);
779
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
780
var producerPath =
TerminalHostPaths
.GetSocketPath(
783
TerminalHostPaths
.ProducerSockPurpose);
801
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
818
var expiredPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
819
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, expiredReplicaId));
820
var recentPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
821
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, recentReplicaId));
848
var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
849
var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
878
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
879
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
911
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
912
var producerPath =
TerminalHostPaths
.GetSocketPath(
915
TerminalHostPaths
.ProducerSockPurpose);
937
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
938
var producerPath =
TerminalHostPaths
.GetSocketPath(
941
TerminalHostPaths
.ProducerSockPurpose);
963
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
964
var producerPath =
TerminalHostPaths
.GetSocketPath(
967
TerminalHostPaths
.ProducerSockPurpose);
992
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
993
var producerPath =
TerminalHostPaths
.GetSocketPath(
996
TerminalHostPaths
.ProducerSockPurpose);
1021
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
1022
var producerPath =
TerminalHostPaths
.GetSocketPath(
1025
TerminalHostPaths
.ProducerSockPurpose);
1062
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = publishDirectory;
1136
=>
TerminalHostPaths
.CreateReplicaId();
1457
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = directory;
1510
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;
1521
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;