65 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)
663ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 689aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (3)
1163aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1210ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 1243var 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)
429EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
BaseContainerAppContext.cs (2)
209EndpointProperty.TargetPort => targetPort is null ? AllocateContainerPortParameter() : $"{targetPort}", 588Port = AsInt(GetEndpointValue(endpointMapping, EndpointProperty.TargetPort)),
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentResource.cs (1)
533EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort
AzureAppServiceWebsiteContext.cs (2)
517var targetPort = GetEndpointValue(mapping, EndpointProperty.TargetPort); 909EndpointProperty.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)
29if (endpointReferenceExpression.Property == EndpointProperty.TargetPort) 85EndpointProperty.TargetPort => _targetPort.ToString(CultureInfo.InvariantCulture), 106EndpointProperty.TargetPort => _targetPort.ToString(CultureInfo.InvariantCulture),
Aspire.Hosting.Azure.Tests (10)
AzureAppServiceTests.cs (1)
1201[InlineData(EndpointProperty.TargetPort, "5000")]
AzureContainerAppExpressEndpointTests.cs (5)
40EndpointProperty.HostAndPort, EndpointProperty.Port, EndpointProperty.TargetPort, 50context.EnvironmentVariables["SELF_TARGET_PORT"] = web.GetEndpoint("http").Property(EndpointProperty.TargetPort); 103[EndpointProperty.TargetPort] = "8080", 121[InlineData(EndpointProperty.TargetPort, "8080")] 142[InlineData(EndpointProperty.TargetPort)]
AzureContainerAppsTests.cs (3)
415context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 519context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 2849[InlineData(EndpointProperty.TargetPort, "5000")]
AzureSandboxesTests.cs (1)
2216Assert.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)
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)
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)
2040c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort)); 2238c.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), 604var val = GetEndpointValue(mapping, epExpr.Property, embedded && epExpr.Property is EndpointProperty.Port or EndpointProperty.TargetPort); 786EndpointProperty.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)
298c.Args.Add(endpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Radius (2)
Publishing\RadiusInfrastructureBuilder.cs (1)
3379case EndpointProperty.Port or EndpointProperty.TargetPort:
RadiusEnvironmentResource.cs (1)
211EndpointProperty.TargetPort => GuardedAddress(endpointReference, () => resolvedServicePort.Value is int targetPort
Aspire.Hosting.Radius.Tests (2)
Publishing\BackingResourceContractTests.cs (1)
130[InlineData(EndpointProperty.TargetPort)]
RadiusEnvironmentResourceTests.cs (1)
79[InlineData(EndpointProperty.TargetPort, "8080")]
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
205argsCtx.Args.Add(redis.GetEndpoint(RedisResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort)); 207argsCtx.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)
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)}");