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