10 writes to TargetHost
Aspire.Hosting (6)
Dashboard\DashboardEventHandlers.cs (4)
432
TargetHost
= address.Host
441
TargetHost
= address.Host
450
TargetHost
= address.Host
459
TargetHost
= address.Host
ProjectResourceBuilderExtensions.cs (2)
536
e.
TargetHost
= ParseKestrelHost(endpoint.BindingAddress.Host);
592
e.
TargetHost
= ParseKestrelHost(bindingAddress.Host);
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
38
TargetHost
= "localhost"
Aspire.Hosting.Tests (3)
Dcp\DcpExecutorTests.cs (1)
1367
endpoint.
TargetHost
= bindingAddress;
WithEndpointTests.cs (2)
605
.WithEndpoint("https", e => e.
TargetHost
= "example.localhost", createIfNotExists: false)
639
.WithEndpoint("https", e => e.
TargetHost
= host, createIfNotExists: false)
21 references to TargetHost
Aspire.Hosting (15)
ApplicationModel\EndpointHostHelpers.cs (2)
115
/// When the endpoint's <see cref="EndpointAnnotation.
TargetHost
"/> is a localhost TLD
135
var targetHost = endpoint.EndpointAnnotation.
TargetHost
;
Dashboard\DashboardEventHandlers.cs (2)
661
ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.
TargetHost
}:{e.Property(EndpointProperty.TargetPort)}");
707
aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.
TargetHost
}:{e.Property(EndpointProperty.TargetPort)}");
Dcp\DcpExecutor.cs (6)
970
var (targetHost, bindingMode) = NormalizeTargetHost(sp.EndpointAnnotation.
TargetHost
);
1131
if (string.Equals(KnownHostNames.Localhost, endpoint.
TargetHost
, StringComparison.OrdinalIgnoreCase))
1137
svc.Spec.Address = endpoint.
TargetHost
;
2315
(spAnn.Address, _) = NormalizeTargetHost(ea.
TargetHost
);
2818
if (sp.EndpointAnnotation.
TargetHost
!= KnownHostNames.Localhost)
2820
portSpec.HostIP = sp.EndpointAnnotation.
TargetHost
;
Orchestrator\ApplicationOrchestrator.cs (3)
259
EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.
TargetHost
, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation
261
Url = $"{allocatedEndpoint.UriScheme}://{endpoint.
TargetHost
}:{allocatedEndpoint.Port}",
275
if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.
TargetHost
))
ProjectResourceBuilderExtensions.cs (2)
540
builder.Resource.KestrelEndpointAnnotationHosts[e] = e.
TargetHost
;
921
aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.
TargetHost
}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
490
if (!EndpointHostHelpers.IsLocalhostOrLocalhostTld(targetEndpointAnnotation.
TargetHost
))
493
throw 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)
286
c.Args.Add(endpoint.EndpointAnnotation.
TargetHost
);
Aspire.Hosting.Tests (3)
ProjectResourceTests.cs (2)
666
Assert.Equal("*", e.
TargetHost
);
672
Assert.Equal("*", e.
TargetHost
);
WithUrlsTests.cs (1)
560
endpoint.AllocatedEndpoint = new(endpoint, endpoint.
TargetHost
, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);