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)
501/// for the consumer UDS path and replica index — those come from <see cref="TerminalHostResource.Layout"/> 510var 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)
402context.Args.Add(host.Layout.ProducerUdsPath); 405context.Args.Add(host.Layout.ConsumerUdsPath); 408context.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)
9988Assert.Equal(hosts[i].Layout.ProducerUdsPath, spec!.UdsPath); 10049Assert.Equal(host.Layout.ProducerUdsPath, exe.Spec.Terminal!.UdsPath); 10093Assert.Equal(host.Layout.ProducerUdsPath, container.Spec.Terminal!.UdsPath);
WithTerminalTests.cs (48)
368h.Layout.MetadataPath, 369h.Layout.ProducerUdsPath, 370h.Layout.ConsumerUdsPath, 371h.Layout.ControlUdsPath, 378File.Exists(host.Layout.MetadataPath), 379$"Metadata sidecar '{host.Layout.MetadataPath}' should exist after BeforeStartEvent."); 383File.WriteAllText(host.Layout.ProducerUdsPath, string.Empty); 384File.WriteAllText(host.Layout.ConsumerUdsPath, string.Empty); 385File.WriteAllText(host.Layout.ControlUdsPath, string.Empty); 428Assert.True(File.Exists(host.Layout.MetadataPath)); 430using var doc = JsonDocument.Parse(await File.ReadAllTextAsync(host.Layout.MetadataPath)); 434Assert.Equal(host.Layout.ReplicaId, root.GetProperty("replicaId").GetString()); 449Assert.Equal(host.Layout.ControlUdsPath, root.GetProperty("controlSocketPath").GetString()); 450Assert.Equal(host.Layout.ConsumerUdsPath, root.GetProperty("consumerSocketPath").GetString()); 453Assert.Equal(_terminalDirectory, Path.GetDirectoryName(host.Layout.MetadataPath)); 454Assert.False(File.Exists(TerminalHostPaths.GetMetadataTemporaryPath(host.Layout.MetadataPath))); 459var mode = File.GetUnixFileMode(host.Layout.MetadataPath); 1063host.Layout.MetadataPath, 1064host.Layout.ProducerUdsPath, 1065host.Layout.ConsumerUdsPath, 1066host.Layout.ControlUdsPath); 1116Assert.NotEmpty(single.Layout.ProducerUdsPath); 1117Assert.NotEmpty(single.Layout.ConsumerUdsPath); 1118Assert.NotEmpty(single.Layout.ControlUdsPath); 1140Assert.NotEmpty(hosts[i].Layout.ReplicaId); 1141Assert.StartsWith(hosts[i].Layout.ReplicaId + ".", Path.GetFileName(hosts[i].Layout.ProducerUdsPath)); 1142Assert.StartsWith(hosts[i].Layout.ReplicaId + ".", Path.GetFileName(hosts[i].Layout.ConsumerUdsPath)); 1189Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.ProducerUdsPath)); 1190Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.ConsumerUdsPath)); 1191Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.ControlUdsPath)); 1192Assert.Equal(expectedDirectory, Path.GetDirectoryName(host.Layout.MetadataPath)); 1194Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ProducerUdsPath)); 1195Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ConsumerUdsPath)); 1196Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.ControlUdsPath)); 1197Assert.StartsWith(host.Layout.ReplicaId + ".", Path.GetFileName(host.Layout.MetadataPath)); 1201Assert.True(seenReplicaIds.Add(host.Layout.ReplicaId), $"Duplicate replica id '{host.Layout.ReplicaId}'."); 1212firstResource.Resource.Annotations.OfType<TerminalAnnotation>().Single().TerminalHosts).Layout.ReplicaId; 1218secondResource.Resource.Annotations.OfType<TerminalAnnotation>().Single().TerminalHosts).Layout.ReplicaId; 1273Assert.Contains(host.Layout.ProducerUdsPath, args); 1274Assert.Contains(host.Layout.ConsumerUdsPath, args); 1275Assert.Contains(host.Layout.ControlUdsPath, args);