12 writes to TargetHost
Aspire.Hosting (6)
ApplicationModel\EndpointUpdateContext.cs (1)
63set => _endpointAnnotation.TargetHost = value;
Dashboard\DashboardEventHandlers.cs (3)
397TargetHost = address.Host 778TargetHost = context.TargetHost 787TargetHost = address.Host
ProjectResourceBuilderExtensions.cs (2)
689e.TargetHost = ParseKestrelHost(endpoint.BindingAddress.Host); 745e.TargetHost = ParseKestrelHost(bindingAddress.Host);
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
40TargetHost = "localhost"
Aspire.Hosting.Tests (5)
ApplicationModel\EndpointHostHelpersTests.cs (2)
222ep.TargetHost = targetHost; 246ep.TargetHost = "app.dev.localhost";
Dcp\DcpExecutorTests.cs (1)
4225endpoint.TargetHost = bindingAddress;
WithEndpointTests.cs (2)
802.WithEndpoint("https", e => e.TargetHost = "example.localhost", createIfNotExists: false) 836.WithEndpoint("https", e => e.TargetHost = host, createIfNotExists: false)
28 references to TargetHost
Aspire.Hosting (16)
ApplicationModel\EndpointHostHelpers.cs (2)
116/// When the endpoint's <see cref="EndpointAnnotation.TargetHost"/> is a localhost TLD 144var targetHost = endpoint.EndpointAnnotation.TargetHost;
ApplicationModel\EndpointUpdateContext.cs (1)
62get => _endpointAnnotation.TargetHost;
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)}");
Dcp\ContainerCreator.cs (2)
1048if (ea.TargetHost != KnownHostNames.Localhost) 1050portSpec.HostIP = ea.TargetHost;
Dcp\DcpExecutor.cs (2)
702if (string.Equals(KnownHostNames.Localhost, endpoint.TargetHost, StringComparison.OrdinalIgnoreCase)) 708svc.Spec.Address = endpoint.TargetHost;
Dcp\DcpModelUtilities.cs (2)
93(spAnn.Address, _) = NormalizeTargetHost(ea.TargetHost); 204var (targetHost, bindingMode) = NormalizeTargetHost(sp.EndpointAnnotation.TargetHost);
Orchestrator\ApplicationOrchestrator.cs (3)
348EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.TargetHost, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation 350Url = $"{allocatedEndpoint.UriScheme}://{endpoint.TargetHost}:{allocatedEndpoint.Port}", 364if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.TargetHost))
ProjectResourceBuilderExtensions.cs (2)
693launchDefaults.KestrelEndpointAnnotationHosts[e] = e.TargetHost; 1116aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
550if (!EndpointHostHelpers.IsLocalhostOrLocalhostTld(targetEndpointAnnotation.TargetHost)) 553throw new ArgumentException($"Cannot tunnel endpoint '{targetEndpointAnnotation.Name}' with host '{targetEndpointAnnotation.TargetHost}' on resource '{targetResource.Name}' because it is not a localhost endpoint.", nameof(targetEndpoint));
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
296c.Args.Add(endpoint.EndpointAnnotation.TargetHost);
Aspire.Hosting.Tests (9)
Dashboard\DashboardResourceTests.cs (6)
217Assert.Equal("localhost", otlpGrpcEndpoint.TargetHost); 220Assert.Equal("localhost", otlpHttpEndpoint.TargetHost); 248Assert.Equal("localhost", otlpGrpcEndpoint.TargetHost); 251Assert.Equal("localhost", otlpHttpEndpoint.TargetHost); 290Assert.Equal(expectedTargetHost, otlpGrpcEndpoint.TargetHost); 291Assert.Equal(expectedTargetHost, otlpHttpEndpoint.TargetHost);
ProjectResourceTests.cs (2)
730Assert.Equal("*", e.TargetHost); 736Assert.Equal("*", e.TargetHost);
WithUrlsTests.cs (1)
559endpoint.AllocatedEndpoint = new(endpoint, endpoint.TargetHost, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);