65 references to TargetPort
Aspire.Hosting (10)
ApplicationModel\EndpointReference.cs (3)
178EndpointProperty.TargetPort => Binding("targetPort"), 405EndpointProperty.TargetPort when Endpoint.TargetPort is int port => new(port.ToString(CultureInfo.InvariantCulture)), 447EndpointProperty.TargetPort => new(ComputeTargetPort(allocatedEndpoint)),
ApplicationModel\IComputeEnvironmentResource.cs (1)
65EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
Dashboard\DashboardEventHandlers.cs (2)
688ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 714aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (3)
1216aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1263ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 1296var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
1984context.EnvironmentVariables[endpointAnnotation.TargetPortEnvironmentVariable!] = endpointReference.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppEnvironmentResource.cs (1)
455EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
BaseContainerAppContext.cs (2)
215EndpointProperty.TargetPort => targetPort is null ? AllocateContainerPortParameter() : $"{targetPort}", 595Port = AsInt(GetEndpointValue(endpointMapping, endpointProbeAnnotation.EndpointReference.Property(EndpointProperty.TargetPort))),
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentResource.cs (1)
583EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
AzureAppServiceWebsiteContext.cs (2)
528var targetPort = GetEndpointValue(mapping, EndpointProperty.TargetPort); 949EndpointProperty.TargetPort => mapping.TargetPort?.ToString(CultureInfo.InvariantCulture) ?? (BicepValue<string>)AllocateParameter(new ContainerPortReference(Resource)),
Aspire.Hosting.Azure.Functions (3)
AzureFunctionsProjectResourceExtensions.cs (3)
273context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.Property(EndpointProperty.TargetPort)}"); 408context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort)); 438context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Azure.Sandboxes (3)
AzureSandboxEndpointPropertyValueProvider.cs (3)
30if (endpointReferenceExpression.Property == EndpointProperty.TargetPort) 86EndpointProperty.TargetPort => _targetPort.ToString(CultureInfo.InvariantCulture), 107EndpointProperty.TargetPort => _targetPort.ToString(CultureInfo.InvariantCulture),
Aspire.Hosting.Azure.Tests (10)
AzureAppServiceTests.cs (1)
1202[InlineData(EndpointProperty.TargetPort, "5000")]
AzureContainerAppExpressEndpointTests.cs (5)
44EndpointProperty.HostAndPort, EndpointProperty.Port, EndpointProperty.TargetPort, 54context.EnvironmentVariables["SELF_TARGET_PORT"] = web.GetEndpoint("http").Property(EndpointProperty.TargetPort); 109[EndpointProperty.TargetPort] = "8080", 127[InlineData(EndpointProperty.TargetPort, "8080")] 148[InlineData(EndpointProperty.TargetPort)]
AzureContainerAppsTests.cs (3)
423context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 529context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 2889[InlineData(EndpointProperty.TargetPort, "5000")]
AzureSandboxesTests.cs (1)
2265Assert.True(AzureSandboxContainerDeployment.TryResolveEndpointReferenceValue(api.GetEndpoint("http").Property(EndpointProperty.TargetPort), sandboxGroup.Resource, out var targetPortExpression));
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)
143EndpointProperty.TargetPort => $"{mapping.InternalPort}",
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
253context.EnvironmentVariables["TP"] = resource.GetEndpoint("http").Property(EndpointProperty.TargetPort); 254context.EnvironmentVariables["TPH2"] = resource.GetEndpoint("h2").Property(EndpointProperty.TargetPort);
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
407return endpointReferenceExpression.Property == EndpointProperty.TargetPort &&
Aspire.Hosting.JavaScript (4)
DenoHostingExtensions.cs (2)
440context.EnvironmentVariables["PORT"] = endpointReference.Property(EndpointProperty.TargetPort); 1424: endpoint.Property(EndpointProperty.TargetPort);
JavaScriptHostingExtensions.cs (2)
2031c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort)); 2232c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
164? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.Property(EndpointProperty.TargetPort)}") 247? 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)
340Port = GetEndpointValue(endpointMapping, EndpointProperty.TargetPort), 614_ => GetEndpointValue(mapping, epExpr.Property, embedded && epExpr.Property is EndpointProperty.Port or EndpointProperty.TargetPort) 795EndpointProperty.TargetPort => GetPort(targetPort),
Aspire.Hosting.Maui (3)
MauiOtlpExtensions.cs (3)
338var targetPort = await TryGetEndpointPortAsync(endpointReference, EndpointProperty.TargetPort, cancellationToken).ConfigureAwait(false); 365var targetPort = await TryGetEndpointPortAsync(endpointReference, EndpointProperty.TargetPort, cancellationToken).ConfigureAwait(false); 379catch (InvalidOperationException) when (property == EndpointProperty.TargetPort && endpointReference.IsAllocated)
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
299c.Args.Add(endpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Radius (2)
Publishing\RadiusInfrastructureBuilder.cs (1)
3383case EndpointProperty.Port or EndpointProperty.TargetPort:
RadiusEnvironmentResource.cs (1)
215EndpointProperty.TargetPort => GuardedAddress(endpointReference, () => resolvedServicePort.Value is int targetPort
Aspire.Hosting.Radius.Tests (2)
Publishing\BackingResourceContractTests.cs (1)
130[InlineData(EndpointProperty.TargetPort)]
RadiusEnvironmentResourceTests.cs (1)
96[InlineData(EndpointProperty.TargetPort, "8080")]
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
209argsCtx.Args.Add(redis.GetEndpoint(RedisResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort)); 211argsCtx.Args.Add(redis.GetEndpoint(RedisResource.SecondaryEndpointName).Property(EndpointProperty.TargetPort));
Aspire.Hosting.Tests (5)
ComputeEnvironmentValidationTests.cs (1)
89[InlineData(EndpointProperty.TargetPort, "5000")]
EndpointReferenceTests.cs (2)
174var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 188var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort);
WithEnvironmentTests.cs (2)
69.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}") 149.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.Yarp (2)
YarpResourceExtensions.cs (2)
73.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)}");