9 writes to TargetHost
Aspire.Hosting (6)
Dashboard\DashboardEventHandlers.cs (4)
402TargetHost = address.Host 411TargetHost = address.Host 420TargetHost = address.Host 429TargetHost = address.Host
ProjectResourceBuilderExtensions.cs (2)
536e.TargetHost = ParseKestrelHost(endpoint.BindingAddress.Host); 592e.TargetHost = ParseKestrelHost(bindingAddress.Host);
Aspire.Hosting.Tests (3)
Dcp\DcpExecutorTests.cs (1)
1263endpoint.TargetHost = bindingAddress;
WithEndpointTests.cs (2)
609.WithEndpoint("https", e => e.TargetHost = "example.localhost", createIfNotExists: false) 643.WithEndpoint("https", e => e.TargetHost = host, createIfNotExists: false)
19 references to TargetHost
Aspire.Hosting (13)
Dashboard\DashboardEventHandlers.cs (2)
613ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 659aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Dcp\DcpExecutor.cs (6)
933var (targetHost, bindingMode) = NormalizeTargetHost(sp.EndpointAnnotation.TargetHost); 1063if (string.Equals(KnownHostNames.Localhost, endpoint.TargetHost, StringComparison.OrdinalIgnoreCase)) 1069svc.Spec.Address = endpoint.TargetHost; 1950(spAnn.Address, _) = NormalizeTargetHost(ea.TargetHost); 2535if (sp.EndpointAnnotation.TargetHost != KnownHostNames.Localhost) 2537portSpec.HostIP = sp.EndpointAnnotation.TargetHost;
Orchestrator\ApplicationOrchestrator.cs (3)
248EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.TargetHost, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation 250Url = $"{allocatedEndpoint.UriScheme}://{endpoint.TargetHost}:{allocatedEndpoint.Port}", 264if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.TargetHost))
ProjectResourceBuilderExtensions.cs (2)
540builder.Resource.KestrelEndpointAnnotationHosts[e] = e.TargetHost; 920aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
469if (!EndpointHostHelpers.IsLocalhostOrLocalhostTld(targetEndpointAnnotation.TargetHost)) 472throw 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)
285c.Args.Add(endpoint.EndpointAnnotation.TargetHost);
Aspire.Hosting.Tests (3)
ProjectResourceTests.cs (2)
633Assert.Equal("*", e.TargetHost); 639Assert.Equal("*", e.TargetHost);
WithUrlsTests.cs (1)
517endpoint.AllocatedEndpoint = new(endpoint, endpoint.TargetHost, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);