28 references to TargetPort
Aspire.Hosting (10)
ApplicationModel\EndpointReference.cs (3)
71EndpointProperty.TargetPort => Binding("targetPort"), 196EndpointProperty.TargetPort when Endpoint.TargetPort is int port => new(port.ToString(CultureInfo.InvariantCulture)), 209EndpointProperty.TargetPort => new(ComputeTargetPort(allocatedEndpoint)),
ApplicationModel\ExpressionResolver.cs (1)
21(EndpointProperty.Port, true) => await endpointReference.Property(EndpointProperty.TargetPort).GetValueAsync(cancellationToken).ConfigureAwait(false),
Dashboard\DashboardEventHandlers.cs (2)
590ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 615aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (3)
771aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 816ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 848var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
716context.EnvironmentVariables[env] = endpointReference.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.AppContainers (2)
BaseContainerAppContext.cs (2)
201EndpointProperty.TargetPort => targetPort is null ? AllocateContainerPortParameter() : $"{targetPort}", 488Port = AsInt(GetEndpointValue(endpointMapping, EndpointProperty.TargetPort)),
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceWebsiteContext.cs (1)
365EndpointProperty.TargetPort => mapping.TargetPort?.ToString(CultureInfo.InvariantCulture) ?? (BicepValue<string>)AllocateParameter(new ContainerPortReference(Resource)),
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
121context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.Property(EndpointProperty.TargetPort)}"); 208context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Azure.Tests (2)
AzureContainerAppsTests.cs (2)
308context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 385context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Docker (1)
DockerComposeServiceResourceExtensions.cs (1)
96EndpointProperty.TargetPort => $"{mapping.InternalPort}",
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
65context.EnvironmentVariables["TP"] = resource.GetEndpoint("http").Property(EndpointProperty.TargetPort); 66context.EnvironmentVariables["TPH2"] = resource.GetEndpoint("h2").Property(EndpointProperty.TargetPort);
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
140? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.Property(EndpointProperty.TargetPort)}") 218? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Port.ToString(CultureInfo.InvariantCulture)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.Property(EndpointProperty.TargetPort)}")
Aspire.Hosting.Kubernetes (2)
KubernetesResource.cs (2)
248Port = GetEndpointValue(endpointMapping, EndpointProperty.TargetPort), 450EndpointProperty.TargetPort => port,
Aspire.Hosting.Tests (4)
EndpointReferenceTests.cs (2)
136var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 150var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort);
WithEnvironmentTests.cs (2)
237.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}") 310.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}");