146 writes to AllocatedEndpoint
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
973sp.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(
Aspire.Hosting.Azure.Tests (38)
AzureCosmosDBExtensionsTests.cs (1)
270e.WithEndpoint("emulator", e => e.AllocatedEndpoint = new(e, "localhost", 10001));
AzureFunctionsTests.cs (2)
72e.AllocatedEndpoint = new(e, "localhost", 1234); 251e.AllocatedEndpoint = new(e, "localhost", 1234);
AzureKeyVaultTests.cs (2)
430keyVault.WithEndpoint("https", endpoint => endpoint.AllocatedEndpoint = new(endpoint, "localhost", 8443)); 490keyVault.WithEndpoint("https", endpoint => endpoint.AllocatedEndpoint = new(endpoint, "localhost", 8443));
AzureManagedRedisExtensionsTests.cs (3)
57c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)); 80c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)) 150c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6379));
AzurePostgresExtensionsTests.cs (5)
122c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)); 165c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)) 234c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)); 318c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5432)); 470postgres.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 1234));
AzureRedisExtensionsTests.cs (4)
101c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)); 124c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)) 194c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6379)); 240.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455))
AzureSignalREmulatorFunctionalTest.cs (1)
25e.WithEndpoint("emulator", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 10001));
AzureSqlDatabaseConnectionPropertiesTests.cs (2)
90c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 1433)); 141c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 1433));
AzureSqlExtensionsTests.cs (2)
82c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455)); 134c.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 12455))
AzureStorageExtensionsTests.cs (15)
180e.WithEndpoint("blob", e => e.AllocatedEndpoint = new(e, "localhost", 10000)); 181e.WithEndpoint("queue", e => e.AllocatedEndpoint = new(e, "localhost", 10001)); 182e.WithEndpoint("table", e => e.AllocatedEndpoint = new(e, "localhost", 10002)); 228e.WithEndpoint("blob", e => e.AllocatedEndpoint = new(e, "localhost", 10000)); 229e.WithEndpoint("queue", e => e.AllocatedEndpoint = new(e, "localhost", 10001)); 230e.WithEndpoint("table", e => e.AllocatedEndpoint = new(e, "localhost", 10002)); 286e.WithEndpoint("blob", e => e.AllocatedEndpoint = new(e, "localhost", 10000)); 287e.WithEndpoint("queue", e => e.AllocatedEndpoint = new(e, "localhost", 10001)); 288e.WithEndpoint("table", e => e.AllocatedEndpoint = new(e, "localhost", 10002)); 334e.WithEndpoint("blob", e => e.AllocatedEndpoint = new(e, "localhost", 10000)); 335e.WithEndpoint("queue", e => e.AllocatedEndpoint = new(e, "localhost", 10001)); 336e.WithEndpoint("table", e => e.AllocatedEndpoint = new(e, "localhost", 10002)); 406e.WithEndpoint("blob", e => e.AllocatedEndpoint = new(e, "localhost", 10000)); 407e.WithEndpoint("queue", e => e.AllocatedEndpoint = new(e, "localhost", 10001)); 408e.WithEndpoint("table", e => e.AllocatedEndpoint = new(e, "localhost", 10002));
BicepUtilitiesTests.cs (1)
38e.AllocatedEndpoint = new(e, "localhost", 1023);
Aspire.Hosting.Containers.Tests (1)
ContainerResourceTests.cs (1)
102e.AllocatedEndpoint = new(e, "localhost", 1234, targetPortExpression: "1234");
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
622portResource.TunnelEndpointAnnotation.AllocatedEndpoint = new(portResource.TunnelEndpointAnnotation, tunnelPortStatus.PortUri.Host, 443 /* Always 443 for public tunnel endpoint */);
Aspire.Hosting.DevTunnels.Tests (1)
DevTunnelResourceBuilderExtensionsTests.cs (1)
29tunnelPort.TunnelEndpointAnnotation.AllocatedEndpoint = new(tunnelPort.TunnelEndpointAnnotation, "test123.devtunnels.ms", 443);
Aspire.Hosting.Garnet.Tests (2)
AddGarnetTests.cs (2)
75.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 339.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001));
Aspire.Hosting.Kafka.Tests (5)
AddKafkaTests.cs (5)
62.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017)); 119.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017)) 137.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017)) 188.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017)); 209.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017))
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
123endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", otlpPort);
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
83.WithEndpoint("grpc", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", MilvusPortGrpc)); 99.WithEndpoint("grpc", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", MilvusPortGrpc));
Aspire.Hosting.MongoDB.Tests (3)
AddMongoDBTests.cs (3)
77.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017)) 147.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 3000)) 296.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27017))
Aspire.Hosting.MySql.Tests (7)
AddMySqlTests.cs (7)
117.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 135.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)) 240mysql.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 268mysql1.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 269mysql2.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5002, "host3")); 360.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 376.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 3306))
Aspire.Hosting.Nats.Tests (2)
AddNatsTests.cs (2)
39.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 4222)); 69.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 4222));
Aspire.Hosting.Oracle.Tests (2)
AddOracleTests.cs (2)
115.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 134.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000))
Aspire.Hosting.PostgreSQL.Tests (9)
AddPostgresTests.cs (9)
155.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 171.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)) 464pg1.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 465pg2.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5002, "host2")); 525pg1.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 526pg2.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5002, "host2")); 666.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 680.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 694.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5432));
Aspire.Hosting.Qdrant.Tests (3)
AddQdrantTests.cs (3)
156.WithEndpoint("grpc", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6334)); 172.WithEndpoint("grpc", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6334)) 173.WithEndpoint("http", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6333));
Aspire.Hosting.RabbitMQ.Tests (1)
AddRabbitMQTests.cs (1)
98.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 27011));
Aspire.Hosting.Redis.Tests (10)
AddRedisTests.cs (10)
122.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 304redis1.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 305redis2.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5002)); 458.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 497redis.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 523redis.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 543redis1.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 544redis2.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5002, "host2")); 696.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001)); 716.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6379))
Aspire.Hosting.Seq.Tests (2)
AddSeqTests.cs (2)
74.WithEndpoint("http", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 234.WithEndpoint("http", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000));
Aspire.Hosting.SqlServer.Tests (3)
AddSqlServerTests.cs (3)
86.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 1433)); 107.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 1433)) 273.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 1433));
Aspire.Hosting.Tests (50)
Dashboard\DashboardLifecycleHookTests.cs (2)
141httpEndpoint.EndpointAnnotation.AllocatedEndpoint = new(httpEndpoint.EndpointAnnotation, "localhost", 8080); 143otlpGrpcEndpoint.EndpointAnnotation.AllocatedEndpoint = new(otlpGrpcEndpoint.EndpointAnnotation, "localhost", 4317);
Dashboard\DashboardResourceTests.cs (5)
407endpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(endpointAnnotation, "localhost", 8081); 628endpoint.AllocatedEndpoint = new(endpoint, "localhost", otlpGrpcPort, targetPortExpression: otlpGrpcPort.ToString()); 632endpoint.AllocatedEndpoint = new(endpoint, "localhost", otlpHttpPort, targetPortExpression: otlpHttpPort.ToString()); 636endpoint.AllocatedEndpoint = new(endpoint, "localhost", mcpPort, targetPortExpression: mcpPort.ToString()); 640endpoint.AllocatedEndpoint = new(endpoint, "localhost", httpPort, targetPortExpression: httpPort.ToString());
EndpointReferenceTests.cs (7)
22annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "localhost", 8080); 41annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "localhost", 8080); 53annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "localhost", 8080); 75annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "192.168.1.100", 8080); 94annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "localhost", 9090); 155annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "localhost", 8080, targetPortExpression: "5000"); 199annotation.AllocatedEndpoint = new AllocatedEndpoint(annotation, "localhost", 8080);
ExecutableResourceTests.cs (2)
24e.AllocatedEndpoint = new(e, "localhost", 1234); 31e.AllocatedEndpoint = new(e, "localhost", 5678);
ExpressionResolverTests.cs (6)
91e.AllocatedEndpoint = new(e, "localhost", 12345, targetPortExpression: "10000"); 104e.AllocatedEndpoint = new(e, "localhost", 12346, targetPortExpression: "10001"); 116e.AllocatedEndpoint = new(e, "host with space", 12347); 223.WithEndpoint("http", ep => ep.AllocatedEndpoint = new(ep, "localhost", 8001, EndpointBindingMode.SingleAddress, "{{ targetPort }}", KnownNetworkIdentifiers.LocalhostNetwork)); 242.WithEndpoint("http", ep => ep.AllocatedEndpoint = new(ep, "localhost", 8001, EndpointBindingMode.SingleAddress, "{{ targetPort }}", KnownNetworkIdentifiers.LocalhostNetwork)); 267endpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(endpointAnnotation, "localhost", 1234);
KestrelConfigTests.cs (1)
456endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", endpoint.Port ?? 0, targetPortExpression: $"port_{endpoint.Name}");
ProjectResourceTests.cs (10)
347e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p0"); 351e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p1"); 355e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p2"); 359e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p3"); 406e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p0"); 436e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: $"p{index++}"); 580e.AllocatedEndpoint = new(e, "localhost", 1234); 587e.AllocatedEndpoint = new(e, "localhost", 8000); 620e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p0"); 626e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p1");
WithEnvironmentTests.cs (4)
48e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000); 230ep.AllocatedEndpoint = new AllocatedEndpoint(ep, "localhost", 90); 279ep.AllocatedEndpoint = new AllocatedEndpoint(ep, "localhost", 90); 447ep.AllocatedEndpoint = new AllocatedEndpoint(ep, "localhost", 90);
WithReferenceTests.cs (12)
22.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 46.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 66.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 93.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 139.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)) 143.WithEndpoint("myconflictingbinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 3000)); 167.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)) 171.WithEndpoint("mynonconflictingbinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 3000)); 195.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)) 197.WithEndpoint("mybinding2", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 3000)); 225.WithEndpoint("mybinding", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)) 227.WithEndpoint("mybinding2", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 3000));
WithUrlsTests.cs (1)
560endpoint.AllocatedEndpoint = new(endpoint, endpoint.TargetHost, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
75.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000)); 329.WithEndpoint("tcp", e => e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001));
23 references to AllocatedEndpoint
Aspire.Hosting (10)
ApplicationModel\EndpointAnnotation.cs (2)
201/// Gets or sets the default <see cref="AllocatedEndpoint"/> for this Endpoint. 232/// Gets the <see cref="AllocatedEndpointSnapshot"/> for the default <see cref="AllocatedEndpoint"/>.
Backchannel\AppHostRpcTarget.cs (2)
123.Where(e => e.AllocatedEndpoint != null) 124.Select(e => e.AllocatedEndpoint!.UriString)
Dashboard\DashboardEventHandlers.cs (1)
699var origin = endpoint.AllocatedEndpoint?.UriString;
Dcp\DcpExecutor.cs (1)
1027var port = _options.Value.EnableAspireContainerTunnel ? (int)ts.Service!.AllocatedPort! : serverSvc.EndpointAnnotation.AllocatedEndpoint!.Port;
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (2)
44endpoint.AllocatedEndpoint!.UriString, 45endpoint.AllocatedEndpoint!.Port,
Orchestrator\ApplicationOrchestrator.cs (2)
223Debug.Assert(endpoint.AllocatedEndpoint is not null, "Endpoint should be allocated at this point as we're calling this from ResourceEndpointsAllocatedEvent handler."); 224if (endpoint.AllocatedEndpoint is { } allocatedEndpoint)
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
621var raiseEndpointsAllocatedEvent = portResource.TunnelEndpointAnnotation.AllocatedEndpoint is null;
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
121if (endpoint is not null && endpoint.AllocatedEndpoint is null)
Aspire.Hosting.Tests (10)
SlimTestProgramTests.cs (4)
59Assert.NotNull(endpoint.AllocatedEndpoint); 60Assert.Equal(endpoint.Port, endpoint.AllocatedEndpoint.Port); 78Assert.NotNull(endpoint.AllocatedEndpoint); 79Assert.Equal(endpoint.Port, endpoint.AllocatedEndpoint.Port);
WithEndpointTests.cs (6)
622Assert.NotNull(endpoint.AllocatedEndpoint); 623Assert.Equal(EndpointBindingMode.SingleAddress, endpoint.AllocatedEndpoint.BindingMode); 624Assert.Equal("localhost", endpoint.AllocatedEndpoint.Address); 656Assert.NotNull(endpoint.AllocatedEndpoint); 657Assert.Equal(endpointBindingMode, endpoint.AllocatedEndpoint.BindingMode); 658Assert.Equal("localhost", endpoint.AllocatedEndpoint.Address);
TestProject.AppHost (1)
TestProgram.cs (1)
183var allocatedEndpoint = endpoint.AllocatedEndpoint;