13 writes to TargetHost
Aspire.Hosting (6)
ApplicationModel\EndpointUpdateContext.cs (1)
63set => _endpointAnnotation.TargetHost = value;
Dashboard\DashboardEventHandlers.cs (3)
244TargetHost = address.Host 623TargetHost = context.TargetHost 632TargetHost = address.Host
ProjectResourceBuilderExtensions.cs (2)
722e.TargetHost = ParseKestrelHost(endpoint.BindingAddress.Host); 778e.TargetHost = ParseKestrelHost(bindingAddress.Host);
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
39TargetHost = "localhost"
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
877TargetHost = "192.0.2.1"
Aspire.Hosting.Tests (5)
ApplicationModel\EndpointHostHelpersTests.cs (2)
222ep.TargetHost = targetHost; 246ep.TargetHost = "app.dev.localhost";
Dcp\DcpExecutorTests.cs (1)
4945endpoint.TargetHost = bindingAddress;
WithEndpointTests.cs (2)
802.WithEndpoint("https", e => e.TargetHost = "example.localhost", createIfNotExists: false) 836.WithEndpoint("https", e => e.TargetHost = host, createIfNotExists: false)
31 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)
662ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 688aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Dcp\ContainerCreator.cs (2)
732if (ea.TargetHost != KnownHostNames.Localhost) 734portSpec.HostIP = ea.TargetHost;
Dcp\DcpExecutor.cs (2)
694if (string.Equals(KnownHostNames.Localhost, endpoint.TargetHost, StringComparison.OrdinalIgnoreCase)) 700svc.Spec.Address = endpoint.TargetHost;
Dcp\DcpModelUtilities.cs (2)
93(spAnn.Address, _) = NormalizeTargetHost(ea.TargetHost); 209var (targetHost, bindingMode) = NormalizeTargetHost(sp.EndpointAnnotation.TargetHost);
Orchestrator\ApplicationOrchestrator.cs (3)
346EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.TargetHost, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation 348Url = $"{allocatedEndpoint.UriScheme}://{endpoint.TargetHost}:{allocatedEndpoint.Port}", 362if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.TargetHost))
ProjectResourceBuilderExtensions.cs (2)
726launchDefaults.KestrelEndpointAnnotationHosts[e] = e.TargetHost; 1157aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
585if (!EndpointHostHelpers.IsLocalhostOrLocalhostTld(targetEndpointAnnotation.TargetHost)) 588throw 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.JavaScript (1)
DenoHostingExtensions.cs (1)
1421var host = isPublishMode ? "0.0.0.0" : endpoint.EndpointAnnotation.TargetHost;
Aspire.Hosting.Maui (2)
MauiOtlpExtensions.cs (2)
339if (IsLocalTunnelTargetHost(endpointReference.EndpointAnnotation.TargetHost) && 344else if (IsLocalTunnelTargetHost(endpointReference.EndpointAnnotation.TargetHost) &&
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
296c.Args.Add(endpoint.EndpointAnnotation.TargetHost);
Aspire.Hosting.Tests (9)
Dashboard\DashboardResourceTests.cs (6)
229Assert.Equal("localhost", otlpGrpcEndpoint.TargetHost); 232Assert.Equal("localhost", otlpHttpEndpoint.TargetHost); 260Assert.Equal("localhost", otlpGrpcEndpoint.TargetHost); 263Assert.Equal("localhost", otlpHttpEndpoint.TargetHost); 302Assert.Equal(expectedTargetHost, otlpGrpcEndpoint.TargetHost); 303Assert.Equal(expectedTargetHost, otlpHttpEndpoint.TargetHost);
ProjectResourceTests.cs (2)
731Assert.Equal("*", e.TargetHost); 737Assert.Equal("*", e.TargetHost);
WithUrlsTests.cs (1)
579endpoint.AllocatedEndpoint = new(endpoint, endpoint.TargetHost, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);