8 writes to TargetHost
Aspire.Hosting (5)
Dashboard\DashboardLifecycleHook.cs (3)
435TargetHost = address.Host 444TargetHost = address.Host 453TargetHost = address.Host
ProjectResourceBuilderExtensions.cs (2)
401e.TargetHost = ParseKestrelHost(endpoint.BindingAddress.Host); 457e.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\DashboardLifecycleHook.cs (2)
604ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 629aspnetCoreUrls.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; 1655(spAnn.Address, _) = NormalizeTargetHost(ea.TargetHost); 2060if (sp.EndpointAnnotation.TargetHost != "localhost") 2062portSpec.HostIP = sp.EndpointAnnotation.TargetHost;
Orchestrator\ApplicationOrchestrator.cs (2)
234EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.TargetHost, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation 236Url = $"{allocatedEndpoint.UriScheme}://{endpoint.TargetHost}:{allocatedEndpoint.Port}",
ProjectResourceBuilderExtensions.cs (2)
405builder.Resource.KestrelEndpointAnnotationHosts[e] = e.TargetHost; 765aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (3)
DevTunnelResourceBuilderExtensions.cs (3)
354if (!string.Equals(targetEndpointAnnotation.TargetHost, "localhost", StringComparison.OrdinalIgnoreCase) 355&& !targetEndpointAnnotation.TargetHost.EndsWith(".localhost", StringComparison.OrdinalIgnoreCase)) 358throw 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++);