1 write to Layout
Aspire.Hosting (1)
ApplicationModel\TerminalHostResource.cs (1)
34Layout = layout;
72 references to Layout
Aspire.Hosting (9)
ApplicationModel\TerminalHostResource.cs (1)
52public int ParentReplicaIndex => Layout.ParentReplicaIndex;
ApplicationModel\TerminalResourceSnapshotProperties.cs (1)
53? terminalHosts[replicaIndex].Layout.ConsumerUdsPath
Backchannel\AuxiliaryBackchannelRpcTarget.cs (2)
494/// for the consumer UDS path and replica index — those come from <see cref="TerminalHostResource.Layout"/> 503var layout = host.Layout;
Dcp\ContainerCreator.cs (1)
371UdsPath = terminalAnnotation.TerminalHosts[0].Layout.ProducerUdsPath,
Dcp\ExecutableCreator.cs (1)
306UdsPath = terminalAnnotation.TerminalHosts[replicaIndex].Layout.ProducerUdsPath,
TerminalResourceBuilderExtensions.cs (3)
417context.Args.Add(host.Layout.ProducerUdsPath); 420context.Args.Add(host.Layout.ConsumerUdsPath); 423context.Args.Add(host.Layout.ControlUdsPath);
Aspire.Hosting.Tests (63)
Backchannel\GetTerminalInfoAsyncTests.cs (8)
77Assert.Equal(hosts[i].Layout.ConsumerUdsPath, result.Replicas[i].ConsumerUdsPath); 142Assert.Equal(hosts[0].Layout.ConsumerUdsPath, result.Replicas[0].ConsumerUdsPath); 160Assert.Equal(hosts[1].Layout.ConsumerUdsPath, result.Replicas[1].ConsumerUdsPath); 193Assert.Equal(hosts[0].Layout.ConsumerUdsPath, result.Replicas[0].ConsumerUdsPath); 194Assert.Equal(hosts[1].Layout.ConsumerUdsPath, result.Replicas[1].ConsumerUdsPath); 222Assert.Equal(hosts[i].Layout.ConsumerUdsPath, summary.Replicas[i].ConsumerUdsPath); 255Assert.Equal(hosts[0].Layout.ConsumerUdsPath, summary.Replicas[0].ConsumerUdsPath); 256Assert.Equal(hosts[1].Layout.ConsumerUdsPath, summary.Replicas[1].ConsumerUdsPath);
Dashboard\DashboardServiceDataTerminalTests.cs (4)
68Assert.Equal(GetTerminalHosts(resource)[0].Layout.ConsumerUdsPath, path.Value.StringValue); 94GetTerminalHosts(resource)[2].Layout.ConsumerUdsPath, 116GetTerminalHosts(resource)[0].Layout.ConsumerUdsPath, 141GetTerminalHosts(resource)[0].Layout.ConsumerUdsPath,
Dcp\DcpExecutorTests.cs (3)
9798Assert.Equal(hosts[i].Layout.ProducerUdsPath, spec!.UdsPath); 9859Assert.Equal(host.Layout.ProducerUdsPath, exe.Spec.Terminal!.UdsPath); 9903Assert.Equal(host.Layout.ProducerUdsPath, container.Spec.Terminal!.UdsPath);
WithTerminalTests.cs (48)
319h.Layout.MetadataPath, 320h.Layout.ProducerUdsPath, 321h.Layout.ConsumerUdsPath, 322h.Layout.ControlUdsPath, 329File.Exists(host.Layout.MetadataPath), 330$"Metadata sidecar '{host.Layout.MetadataPath}' should exist after BeforeStartEvent."); 334File.WriteAllText(host.Layout.ProducerUdsPath, string.Empty); 335File.WriteAllText(host.Layout.ConsumerUdsPath, string.Empty); 336File.WriteAllText(host.Layout.ControlUdsPath, string.Empty); 379Assert.True(File.Exists(host.Layout.MetadataPath)); 381using var doc = JsonDocument.Parse(await File.ReadAllTextAsync(host.Layout.MetadataPath)); 385Assert.Equal(host.Layout.ReplicaId, root.GetProperty("replicaId").GetString()); 400Assert.Equal(host.Layout.ControlUdsPath, root.GetProperty("controlSocketPath").GetString()); 401Assert.Equal(host.Layout.ConsumerUdsPath, root.GetProperty("consumerSocketPath").GetString()); 404Assert.Equal(_terminalDirectory, Path.GetDirectoryName(host.Layout.MetadataPath)); 405Assert.False(File.Exists(TerminalHostPaths.GetMetadataTemporaryPath(host.Layout.MetadataPath))); 410var mode = File.GetUnixFileMode(host.Layout.MetadataPath); 1014host.Layout.MetadataPath, 1015host.Layout.ProducerUdsPath, 1016host.Layout.ConsumerUdsPath, 1017host.Layout.ControlUdsPath); 1067Assert.NotEmpty(single.Layout.ProducerUdsPath); 1068Assert.NotEmpty(single.Layout.ConsumerUdsPath); 1069Assert.NotEmpty(single.Layout.ControlUdsPath); 1091Assert.NotEmpty(hosts[i].Layout.ReplicaId); 1092Assert.StartsWith(hosts[i].Layout.ReplicaId + ".", Path.GetFileName(hosts[i].Layout.ProducerUdsPath)); 1093Assert.StartsWith(hosts[i].Layout.ReplicaId + ".", Path.GetFileName(hosts[i].Layout.ConsumerUdsPath)); 1140Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.ProducerUdsPath)); 1141Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.ConsumerUdsPath)); 1142Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.ControlUdsPath)); 1143Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.MetadataPath)); 1145Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ProducerUdsPath)); 1146Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ConsumerUdsPath)); 1147Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ControlUdsPath)); 1148Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.MetadataPath)); 1152Assert.True(seenReplicaIds.Add(host.Layout.ReplicaId), $"Duplicate replica id '{host.Layout.ReplicaId}'."); 1163firstResource.Resource.Annotations.OfType<TerminalAnnotation>().Single().TerminalHosts).Layout.ReplicaId; 1169secondResource.Resource.Annotations.OfType<TerminalAnnotation>().Single().TerminalHosts).Layout.ReplicaId; 1224Assert.Contains(host.Layout.ProducerUdsPath, args); 1225Assert.Contains(host.Layout.ConsumerUdsPath, args); 1226Assert.Contains(host.Layout.ControlUdsPath, args);