28 writes to Port
Aspire.Hosting (1)
ProjectResourceBuilderExtensions.cs (1)
452e.Port = bindingAddress.Port;
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
334endpoint.Port = ep;
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
198endpoint.Port = port;
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
283endpoint.Port = port;
Aspire.Hosting.Azure.Storage (3)
AzureStorageExtensions.cs (3)
181endpoint.Port = port; 195endpoint.Port = port; 209endpoint.Port = port;
Aspire.Hosting.Dapr.Tests (3)
DaprTests.cs (3)
29e.Port = 8000; 111e.Port = 8000; 117e.Port = 8001;
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
164endpoint.Port = port;
Aspire.Hosting.MongoDB (1)
MongoDBBuilderExtensions.cs (1)
167endpoint.Port = port;
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
191endpoint.Port = port;
Aspire.Hosting.PostgreSQL (2)
PostgresBuilderExtensions.cs (2)
227endpoint.Port = port; 241endpoint.Port = port;
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
333endpoint.Port = port; 349endpoint.Port = port;
Aspire.Hosting.Tests (8)
DistributedApplicationTests.cs (4)
671endpoint.Port = null; 692e.Port = 1234; 727e.Port = 1234; 734e.Port = 1543;
WithEndpointTests.cs (4)
26endpoint.Port = 2000; 42endpoint.Port = 2000; 96endpoint.Port = null; 100endpoint.Port = 2001;
Dapr.AppHost (2)
Program.cs (2)
5.WithEndpoint("tcp", e => e.Port = 5672) 6.WithEndpoint("management", e => e.Port = 15672);
ProxylessEndToEnd.AppHost (1)
Program.cs (1)
15e.Port = 12345;
88 references to Port
Aspire.Hosting (6)
ApplicationModel\EndpointAnnotation.cs (1)
90/// Defaults to <see cref="Port"/>.
Dcp\ApplicationExecutor.cs (3)
1629if (!ea.IsProxied && ea.Port is int) 1631portSpec.HostPort = ea.Port; 1878throw new InvalidOperationException($"The endpoint '{ea.Name}' for resource '{modelResourceName}' is not using a proxy, and it has a value of {nameof(EndpointAnnotation.Port)} property that is different from the value of {nameof(EndpointAnnotation.TargetPort)} property. For proxy-less endpoints they must match.");
Publishing\ManifestPublishingContext.cs (2)
413int? targetPort = (resource, endpoint.UriScheme, endpoint.TargetPort, endpoint.Port) switch 436int? exposedPort = (endpoint.UriScheme, endpoint.Port, targetPort) switch
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppsInfrastructure.cs (5)
288int? targetPort = (resource, endpoint.UriScheme, endpoint.TargetPort, endpoint.Port) switch 311int? exposedPort = (endpoint.UriScheme, endpoint.Port, targetPort) switch 414if (e.UriScheme is "http" && e.Port is not null and not 80) 419if (e.UriScheme is "https" && e.Port is not null and not 443) 447_endpointMapping[e.Name] = new(e.UriScheme, resource.Name, e.Port ?? g.Port.Value, g.Port.Value, false, g.External);
Aspire.Hosting.Azure.Tests (10)
AzureEventHubsExtensionsTests.cs (1)
181e => Assert.Equal(port, e.Port)
AzureFunctionsTests.cs (5)
37Assert.Equal(7071, endpointAnnotation.Port); 52Assert.Null(endpointAnnotation.Port); 66Assert.Equal(7072, endpointAnnotation.Port); 80Assert.Null(endpointAnnotation.Port); 94Assert.Null(endpointAnnotation.Port);
AzureResourceExtensionsTests.cs (4)
131e => Assert.Equal(9001, e.Port), 132e => Assert.Equal(9002, e.Port), 133e => Assert.Equal(9003, e.Port)); 154var actualPort = endpointAnnotation.Port;
Aspire.Hosting.Elasticsearch.Tests (4)
AddElasticsearchTests.cs (4)
36Assert.Null(primaryEndpoint.Port); 45Assert.Null(internalEndpoint.Port); 98Assert.Null(primaryEndpoint.Port); 107Assert.Null(internalEndpoint.Port);
Aspire.Hosting.Garnet.Tests (2)
AddGarnetTests.cs (2)
31Assert.Null(endpoint.Port); 59Assert.Equal(8813, endpoint.Port);
Aspire.Hosting.Kafka.Tests (3)
AddKafkaTests.cs (3)
35Assert.Null(primaryEndpoint.Port); 44Assert.Null(internalEndpoint.Port); 178Assert.Equal(port, kafkaUiEndpoint.Port);
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
33Assert.Null(endpoint.Port);
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
43Assert.Null(endpoint.Port); 74Assert.Null(endpoint.Port); 201Assert.Equal(5503, grpcEndpoint.Port);
Aspire.Hosting.MongoDB.Tests (3)
AddMongoDBTests.cs (3)
33Assert.Null(endpoint.Port); 61Assert.Equal(9813, endpoint.Port); 136Assert.Equal(1000, endpoint.Port);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
58Assert.Null(endpoint.Port); 98Assert.Equal(1234, endpoint.Port);
Aspire.Hosting.Nats.Tests (2)
AddNatsTests.cs (2)
103Assert.Null(endpoint.Port); 149Assert.Equal(1234, endpoint.Port);
Aspire.Hosting.Oracle.Tests (3)
AddOracleTests.cs (3)
57Assert.Null(endpoint.Port); 97Assert.Equal(1234, endpoint.Port); 180Assert.Equal(1234, endpoint.Port);
Aspire.Hosting.PostgreSQL.Tests (4)
AddPostgresTests.cs (4)
67Assert.Null(endpoint.Port); 122Assert.Equal(1234, endpoint.Port); 214Assert.Equal(1234, endpoint.Port); 426Assert.Equal(1000, endpoint.Port);
Aspire.Hosting.Qdrant.Tests (5)
AddQdrantTests.cs (5)
62Assert.Null(endpoint.Port); 102Assert.Null(endpoint.Port); 135Assert.Null(endpoint.Port); 297Assert.Equal(5503, grpcEndpoint.Port); 305Assert.Equal(5504, httpEndpoint.Port);
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
60Assert.Null(primaryEndpoint.Port); 77Assert.Null(mangementEndpoint.Port); 81Assert.Equal(withManagementPluginPort.Value, mangementEndpoint.Port);
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (4)
40Assert.Null(endpoint.Port); 68Assert.Equal(9813, endpoint.Port); 189Assert.Equal(1000, endpoint.Port); 203Assert.Equal(1000, endpoint.Port);
Aspire.Hosting.SqlServer.Tests (1)
AddSqlServerTests.cs (1)
53Assert.Null(endpoint.Port);
Aspire.Hosting.Tests (25)
KestrelConfigTests.cs (7)
31Assert.Equal(5002, a.Port); 67Assert.Equal(5031, a.Port); 73Assert.Equal(5017, a.Port); 100Assert.Equal(7002, a.Port); 117Assert.Equal(5002, a.Port); 125Assert.Equal(5003, a.Port); 463endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", endpoint.Port ?? 0, targetPortExpression: $"port_{endpoint.Name}");
ProjectResourceTests.cs (10)
256Assert.Equal(7123, a.Port); 262Assert.Equal(5156, a.Port); 338e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p0"); 342e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p1"); 346e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p2"); 350e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p3"); 397e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p0"); 427e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: $"p{index++}"); 605e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p0"); 611e.AllocatedEndpoint = new(e, "localhost", e.Port!.Value, targetPortExpression: "p1");
SlimTestProgramTests.cs (2)
58Assert.Equal(endpoint.Port, endpoint.AllocatedEndpoint.Port); 76Assert.Equal(endpoint.Port, endpoint.AllocatedEndpoint.Port);
WithEndpointTests.cs (6)
31Assert.Equal(2000, endpoint.Port); 85Assert.Equal(2000, endpoint.Port); 89Assert.Null(endpoint.Port); 93Assert.Equal(2000, endpoint.Port); 97Assert.Null(endpoint.Port); 101Assert.Equal(2001, endpoint.Port);
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
31Assert.Null(endpoint.Port); 59Assert.Equal(8813, endpoint.Port);