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)
169
var trmnlDirectory = configuration[
TerminalHostPaths
.DirectoryOverrideConfigName];
174
trmnlDirectory =
TerminalHostPaths
.GetTrmnlDirectory(homeDirectory);
192
var replicaId =
TerminalHostPaths
.CreateReplicaId();
277
var temporaryMetadataPath =
TerminalHostPaths
.GetMetadataTemporaryPath(metadataPath);
405
var producerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ProducerSockPurpose);
406
var consumerPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ConsumerSockPurpose);
407
var controlPath =
TerminalHostPaths
.GetSocketPath(trmnlDirectory, replicaId,
TerminalHostPaths
.ControlSockPurpose);
408
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)
556
Assert.False(File.Exists(
TerminalHostPaths
.GetMetadataTemporaryPath(host.Layout.MetadataPath)));
587
var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.MetadataSuffix}");
588
var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
589
var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ConsumerSockPurpose}.sock");
590
var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{
TerminalHostPaths
.ControlSockPurpose}.sock");
642
var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.MetadataSuffix}");
643
var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
693
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
694
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
725
var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
726
var producerPath =
TerminalHostPaths
.GetSocketPath(
729
TerminalHostPaths
.ProducerSockPurpose);
765
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
766
var producerPath =
TerminalHostPaths
.GetSocketPath(
769
TerminalHostPaths
.ProducerSockPurpose);
791
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
792
var producerPath =
TerminalHostPaths
.GetSocketPath(
795
TerminalHostPaths
.ProducerSockPurpose);
813
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
830
var expiredPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
831
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, expiredReplicaId));
832
var recentPath =
TerminalHostPaths
.GetMetadataTemporaryPath(
833
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, recentReplicaId));
860
var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.MetadataSuffix}");
861
var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
890
var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.MetadataSuffix}");
891
var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{
TerminalHostPaths
.ProducerSockPurpose}.sock");
923
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
924
var producerPath =
TerminalHostPaths
.GetSocketPath(
927
TerminalHostPaths
.ProducerSockPurpose);
949
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
950
var producerPath =
TerminalHostPaths
.GetSocketPath(
953
TerminalHostPaths
.ProducerSockPurpose);
975
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
976
var producerPath =
TerminalHostPaths
.GetSocketPath(
979
TerminalHostPaths
.ProducerSockPurpose);
1004
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
1005
var producerPath =
TerminalHostPaths
.GetSocketPath(
1008
TerminalHostPaths
.ProducerSockPurpose);
1033
var metadataPath =
TerminalHostPaths
.GetMetadataPath(trmnlDirectory, replicaId);
1034
var producerPath =
TerminalHostPaths
.GetSocketPath(
1037
TerminalHostPaths
.ProducerSockPurpose);
1074
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = publishDirectory;
1148
=>
TerminalHostPaths
.CreateReplicaId();
1471
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = directory;
1524
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;
1535
builder.Configuration[
TerminalHostPaths
.DirectoryOverrideConfigName] = _terminalDirectory;