48 references to TargetPort
Aspire.Hosting (10)
ApplicationModel\EndpointReference.cs (3)
145EndpointProperty.TargetPort => Binding("targetPort"), 368EndpointProperty.TargetPort when Endpoint.TargetPort is int port => new(port.ToString(CultureInfo.InvariantCulture)), 382EndpointProperty.TargetPort => new(ComputeTargetPort(allocatedEndpoint)),
ApplicationModel\IComputeEnvironmentResource.cs (1)
58EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
Dashboard\DashboardEventHandlers.cs (2)
817ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 843aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (3)
1116aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1163ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 1196var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
1672context.EnvironmentVariables[endpointAnnotation.TargetPortEnvironmentVariable!] = endpointReference.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppEnvironmentResource.cs (1)
381EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
BaseContainerAppContext.cs (2)
209EndpointProperty.TargetPort => targetPort is null ? AllocateContainerPortParameter() : $"{targetPort}", 560Port = AsInt(GetEndpointValue(endpointMapping, EndpointProperty.TargetPort)),
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentResource.cs (1)
533EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
AzureAppServiceWebsiteContext.cs (2)
476var targetPort = GetEndpointValue(mapping, EndpointProperty.TargetPort); 870EndpointProperty.TargetPort => mapping.TargetPort?.ToString(CultureInfo.InvariantCulture) ?? (BicepValue<string>)AllocateParameter(new ContainerPortReference(Resource)),
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
225context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.Property(EndpointProperty.TargetPort)}"); 312context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Azure.Tests (4)
AzureAppServiceTests.cs (1)
1133[InlineData(EndpointProperty.TargetPort, "5000")]
AzureContainerAppsTests.cs (3)
369context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 446context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 2735[InlineData(EndpointProperty.TargetPort, "5000")]
Aspire.Hosting.DevTunnels (2)
DevTunnelResource.cs (2)
115return await GetResolvedEndpointPortAsync(EndpointProperty.TargetPort, cancellationToken).ConfigureAwait(false) 126catch (InvalidOperationException) when (property == EndpointProperty.TargetPort && TargetEndpoint.IsAllocated)
Aspire.Hosting.Docker (1)
DockerComposeServiceResourceExtensions.cs (1)
109EndpointProperty.TargetPort => $"{mapping.InternalPort}",
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
68context.EnvironmentVariables["TP"] = resource.GetEndpoint("http").Property(EndpointProperty.TargetPort); 69context.EnvironmentVariables["TPH2"] = resource.GetEndpoint("h2").Property(EndpointProperty.TargetPort);
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
381return endpointReferenceExpression.Property == EndpointProperty.TargetPort &&
Aspire.Hosting.JavaScript (2)
JavaScriptHostingExtensions.cs (2)
1497c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort)); 1695c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
145? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.Property(EndpointProperty.TargetPort)}") 228? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Property(EndpointProperty.Port)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.Property(EndpointProperty.TargetPort)}")
Aspire.Hosting.Keycloak (1)
KeycloakResourceBuilderExtensions.cs (1)
120context.EnvironmentVariables["KC_HTTPS_PORT"] = keycloak.GetEndpoint(KeycloakResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort);
Aspire.Hosting.Kubernetes (3)
KubernetesResource.cs (3)
343Port = GetEndpointValue(endpointMapping, EndpointProperty.TargetPort), 584var val = GetEndpointValue(mapping, epExpr.Property, embedded && epExpr.Property is EndpointProperty.Port or EndpointProperty.TargetPort); 766EndpointProperty.TargetPort => GetPort(targetPort),
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
300c.Args.Add(endpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Radius (1)
RadiusEnvironmentResource.cs (1)
173EndpointProperty.TargetPort => resolvedServicePort is int targetPort
Aspire.Hosting.Radius.Tests (1)
RadiusEnvironmentResourceTests.cs (1)
79[InlineData(EndpointProperty.TargetPort, "8080")]
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
204argsCtx.Args.Add(redis.GetEndpoint(RedisResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort)); 206argsCtx.Args.Add(redis.GetEndpoint(RedisResource.SecondaryEndpointName).Property(EndpointProperty.TargetPort));
Aspire.Hosting.Tests (5)
ComputeEnvironmentValidationTests.cs (1)
68[InlineData(EndpointProperty.TargetPort, "5000")]
EndpointReferenceTests.cs (2)
138var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 152var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort);
WithEnvironmentTests.cs (2)
241.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}") 321.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.Yarp (2)
YarpResourceExtensions.cs (2)
74.WithEnvironment("ASPNETCORE_URLS", $"{resource.GetEndpoint("https").Property(EndpointProperty.Scheme)}://*:{resource.GetEndpoint("https").Property(EndpointProperty.TargetPort)};{resource.GetEndpoint("http").Property(EndpointProperty.Scheme)}://*:{resource.GetEndpoint("http").Property(EndpointProperty.TargetPort)}");