85 references to Port
Aspire.Hosting (5)
ApplicationModel\EndpointReference.cs (2)
143EndpointProperty.Port => Binding("port"), 381EndpointProperty.Port => new(allocatedEndpoint.Port.ToString(CultureInfo.InvariantCulture)),
ApplicationModel\HostUrl.cs (1)
84var port = await targetEndpoint.Property(EndpointProperty.Port).GetValueAsync(context, cancellationToken).ConfigureAwait(false);
ApplicationModel\IComputeEnvironmentResource.cs (1)
57EndpointProperty.Port => ReferenceExpression.Create($"{port.ToString(CultureInfo.InvariantCulture)}"),
ProjectResourceBuilderExtensions.cs (1)
1111context.EnvironmentVariables[KnownAspNetCoreConfigNames.HttpsPort] = e.Property(EndpointProperty.Port);
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppEnvironmentResource.cs (1)
380EndpointProperty.Port => ReferenceExpression.Create($"{port.ToString(CultureInfo.InvariantCulture)}"),
BaseContainerAppContext.cs (1)
207EndpointProperty.Port => port.ToString(CultureInfo.InvariantCulture),
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceEnvironmentResource.cs (1)
532EndpointProperty.Port => ReferenceExpression.Create($"{port.ToString(CultureInfo.InvariantCulture)}"),
AzureAppServiceWebsiteContext.cs (1)
869EndpointProperty.Port => mapping.Port.ToString(CultureInfo.InvariantCulture),
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBEmulatorConnectionString.cs (1)
14: ReferenceExpression.Create($"AccountKey={CosmosConstants.EmulatorAccountKey};AccountEndpoint=https://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)};DisableServerCertificateValidation=True;");
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsResource.cs (1)
78ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Port)}") :
Aspire.Hosting.Azure.Functions (1)
DurableTask\DurableTaskSchedulerResource.cs (1)
36return ReferenceExpression.Create($"Endpoint={grpcEndpoint.Property(EndpointProperty.Scheme)}://{grpcEndpoint.Property(EndpointProperty.Host)}:{grpcEndpoint.Property(EndpointProperty.Port)};Authentication=None");
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusResource.cs (1)
68ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Port)}") :
Aspire.Hosting.Azure.Storage (1)
AzureStorageEmulatorConnectionString.cs (1)
35builder.Append($"{key}={endpoint.Property(EndpointProperty.Scheme)}://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)}/devstoreaccount1;");
Aspire.Hosting.Azure.Tests (5)
AzureAppServiceTests.cs (1)
1132[InlineData(EndpointProperty.Port, "443")]
AzureContainerAppsTests.cs (3)
370context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 447context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 2734[InlineData(EndpointProperty.Port, "443")]
src\Aspire.Hosting.Azure.Storage\AzureStorageEmulatorConnectionString.cs (1)
35builder.Append($"{key}={endpoint.Property(EndpointProperty.Scheme)}://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)}/devstoreaccount1;");
Aspire.Hosting.DevTunnels (1)
DevTunnelResource.cs (1)
106return await GetResolvedEndpointPortAsync(EndpointProperty.Port, cancellationToken).ConfigureAwait(false)
Aspire.Hosting.Docker (1)
DockerComposeServiceResourceExtensions.cs (1)
107EndpointProperty.Port => mapping.InternalPort,
Aspire.Hosting.Garnet (1)
GarnetResource.cs (1)
40public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (1)
228? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Property(EndpointProperty.Port)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.Property(EndpointProperty.TargetPort)}")
KafkaServerResource.cs (1)
37public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Kubernetes (2)
KubernetesResource.cs (2)
584var val = GetEndpointValue(mapping, epExpr.Property, embedded && epExpr.Property is EndpointProperty.Port or EndpointProperty.TargetPort); 764EndpointProperty.Port => GetPort(servicePort),
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
47public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
45public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.MySql (2)
MySqlServerResource.cs (2)
44public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 56$"Server={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter}");
Aspire.Hosting.Nats (1)
NatsServerResource.cs (1)
44public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
41public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.PostgreSQL (2)
PostgresServerResource.cs (2)
58$"Host={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};Username={UserNameReference};Password={PasswordParameter}"); 114public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Qdrant (2)
QdrantServerResource.cs (2)
47public EndpointReferenceExpression GrpcPort => PrimaryEndpoint.Property(EndpointProperty.Port); 62public EndpointReferenceExpression HttpPort => HttpEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.RabbitMQ (1)
RabbitMQServerResource.cs (1)
50public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Radius (1)
RadiusEnvironmentResource.cs (1)
167EndpointProperty.Port => ReferenceExpression.Create($"{RadiusServiceDiscovery.ToInvariantString(port)}"),
Aspire.Hosting.Radius.Tests (1)
RadiusEnvironmentResourceTests.cs (1)
78[InlineData(EndpointProperty.Port, "8080")]
Aspire.Hosting.Redis (1)
RedisResource.cs (1)
59public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Seq (1)
SeqResource.cs (1)
30public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.SqlServer (2)
SqlServerServerResource.cs (2)
41public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 50$"Server={PrimaryEndpoint.Property(EndpointProperty.IPV4Host)},{PrimaryEndpoint.Property(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter};TrustServerCertificate=true");
Aspire.Hosting.Tests (34)
ComputeEnvironmentValidationTests.cs (1)
67[InlineData(EndpointProperty.Port, "8080")]
Dcp\DcpExecutorTests.cs (17)
376.WithArgs(c => c.Args.Add(endpoint.Property(EndpointProperty.Port))); 416c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 3807Assert.Equal(allocatedPort.ToString(CultureInfo.InvariantCulture), await database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port).GetValueAsync()); 3823database.WithEnvironment("PUBLIC_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 3824database.WithEnvironment("PUBLIC_PORT_AGAIN", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 8831.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 8832.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 8838.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 8839.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 9017c.EnvironmentVariables["EXEC_PORT"] = executable.GetEndpoint("http").Property(EndpointProperty.Port); 9052c.EnvironmentVariables["EXEC_PORT"] = executable.GetEndpoint("http").Property(EndpointProperty.Port); 9093c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 9329c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 9366.WithEnvironment("EXEC_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 9401.WithEnvironment("EXEC_A_PORT", executableA.GetEndpoint("http").Property(EndpointProperty.Port)); 9407.WithEnvironment("EXEC_B_PORT", executableB.GetEndpoint("http").Property(EndpointProperty.Port)) 9464.WithEnvironment("UPSTREAM_PORT", upstreamExecutable.GetEndpoint("http").Property(EndpointProperty.Port))
EndpointReferenceTests.cs (6)
91var portExpr = endpointRef.Property(EndpointProperty.Port); 191var expr3 = endpointRef.Property(EndpointProperty.Port); 318[InlineData(EndpointProperty.Port, ResourceKind.Host, ResourceKind.Host, "1234")] 319[InlineData(EndpointProperty.Port, ResourceKind.Host, ResourceKind.Container, "1234")] 320[InlineData(EndpointProperty.Port, ResourceKind.Container, ResourceKind.Host, "1234")] 321[InlineData(EndpointProperty.Port, ResourceKind.Container, ResourceKind.Container, "4567")]
ExpressionResolverTests.cs (6)
351{ "TwoFullEndpoints", ReferenceExpression.Create($"Test1={Endpoint1.Property(EndpointProperty.Scheme)}://{Endpoint1.Property(EndpointProperty.IPV4Host)}:{Endpoint1.Property(EndpointProperty.Port)}/;Test2={Endpoint2.Property(EndpointProperty.Scheme)}://{Endpoint2.Property(EndpointProperty.Host)}:{Endpoint2.Property(EndpointProperty.Port)}/;") }, 355{ "OnlyPort", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};") }, 357{ "PortBeforeHost", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};Host={Endpoint1.Property(EndpointProperty.Host)};") }, 358{ "FullAndPartial", ReferenceExpression.Create($"Test1={Endpoint1.Property(EndpointProperty.Scheme)}://{Endpoint1.Property(EndpointProperty.IPV4Host)}:{Endpoint1.Property(EndpointProperty.Port)}/;Test2={Endpoint2.Property(EndpointProperty.Scheme)}://localhost:{Endpoint2.Property(EndpointProperty.Port)}/;") },
ResourceDependencyTests.cs (1)
55.WithEnvironment("API_PORT", api.GetEndpoint("http").Property(EndpointProperty.Port));
WithEnvironmentTests.cs (3)
240.WithEnvironment("PORT", $"{endpoint.Property(EndpointProperty.Port)}") 288.WithEnvironment("URL", $"{endpoint.Property(EndpointProperty.Host)}:{endpoint.Property(EndpointProperty.Port)}"); 452var portProperty = endpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Valkey (1)
ValkeyResource.cs (1)
45public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Yarp (1)
YarpResourceExtensions.cs (1)
73.WithEnvironment("ASPNETCORE_HTTPS_PORT", resource.GetEndpoint("https").Property(EndpointProperty.Port))
AspireWithNode.AppHost (1)
AppHost.cs (1)
44ctx.EnvironmentVariables["HTTPS_REDIRECT_PORT"] = httpsEndpoint.Property(EndpointProperty.Port);
Stress.AppHost (5)
AppHost.cs (5)
24.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))); 28.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))); 33.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))); 37.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))) 74.WithEnvironment("PORT", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Port)}")