8 writes to TargetHost
Aspire.Hosting (5)
Dashboard\DashboardEventHandlers.cs (3)
400TargetHost = address.Host 409TargetHost = address.Host 418TargetHost = address.Host
ProjectResourceBuilderExtensions.cs (2)
402e.TargetHost = ParseKestrelHost(endpoint.BindingAddress.Host); 458e.TargetHost = ParseKestrelHost(bindingAddress.Host);
Aspire.Hosting.Tests (3)
Dcp\DcpExecutorTests.cs (1)
1252endpoint.TargetHost = bindingAddress;
WithEndpointTests.cs (2)
627.WithEndpoint("https", e => e.TargetHost = "example.localhost", createIfNotExists: false) 661.WithEndpoint("https", e => e.TargetHost = host, createIfNotExists: false)
18 references to TargetHost
Aspire.Hosting (12)
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)}");
Dcp\DcpExecutor.cs (6)
847var (targetHost, bindingMode) = NormalizeTargetHost(sp.EndpointAnnotation.TargetHost); 888if (string.Equals("localhost", endpoint.TargetHost, StringComparison.OrdinalIgnoreCase)) 894svc.Spec.Address = endpoint.TargetHost; 1656(spAnn.Address, _) = NormalizeTargetHost(ea.TargetHost); 2067if (sp.EndpointAnnotation.TargetHost != "localhost") 2069portSpec.HostIP = sp.EndpointAnnotation.TargetHost;
Orchestrator\ApplicationOrchestrator.cs (2)
238EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.TargetHost, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation 240Url = $"{allocatedEndpoint.UriScheme}://{endpoint.TargetHost}:{allocatedEndpoint.Port}",
ProjectResourceBuilderExtensions.cs (2)
406builder.Resource.KestrelEndpointAnnotationHosts[e] = e.TargetHost; 771aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (3)
DevTunnelResourceBuilderExtensions.cs (3)
455if (!string.Equals(targetEndpointAnnotation.TargetHost, "localhost", StringComparison.OrdinalIgnoreCase) 456&& !targetEndpointAnnotation.TargetHost.EndsWith(".localhost", StringComparison.OrdinalIgnoreCase)) 459throw 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.Tests (3)
ProjectResourceTests.cs (2)
623Assert.Equal("*", e.TargetHost); 629Assert.Equal("*", e.TargetHost);
WithUrlsTests.cs (1)
463endpoint.AllocatedEndpoint = new(endpoint, endpoint.TargetHost, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);