12 writes to TargetHost
Aspire.Hosting (6)
ApplicationModel\EndpointUpdateContext.cs (1)
63
set => _endpointAnnotation.
TargetHost
= value;
Dashboard\DashboardEventHandlers.cs (3)
397
TargetHost
= address.Host
778
TargetHost
= context.TargetHost
787
TargetHost
= address.Host
ProjectResourceBuilderExtensions.cs (2)
689
e.
TargetHost
= ParseKestrelHost(endpoint.BindingAddress.Host);
745
e.
TargetHost
= ParseKestrelHost(bindingAddress.Host);
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
40
TargetHost
= "localhost"
Aspire.Hosting.Tests (5)
ApplicationModel\EndpointHostHelpersTests.cs (2)
222
ep.
TargetHost
= targetHost;
246
ep.
TargetHost
= "app.dev.localhost";
Dcp\DcpExecutorTests.cs (1)
4225
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)
28 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)
817
ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.
TargetHost
}:{e.Property(EndpointProperty.TargetPort)}");
843
aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.
TargetHost
}:{e.Property(EndpointProperty.TargetPort)}");
Dcp\ContainerCreator.cs (2)
1048
if (ea.
TargetHost
!= KnownHostNames.Localhost)
1050
portSpec.HostIP = ea.
TargetHost
;
Dcp\DcpExecutor.cs (2)
702
if (string.Equals(KnownHostNames.Localhost, endpoint.
TargetHost
, StringComparison.OrdinalIgnoreCase))
708
svc.Spec.Address = endpoint.
TargetHost
;
Dcp\DcpModelUtilities.cs (2)
93
(spAnn.Address, _) = NormalizeTargetHost(ea.
TargetHost
);
204
var (targetHost, bindingMode) = NormalizeTargetHost(sp.EndpointAnnotation.
TargetHost
);
Orchestrator\ApplicationOrchestrator.cs (3)
348
EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.
TargetHost
, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation
350
Url = $"{allocatedEndpoint.UriScheme}://{endpoint.
TargetHost
}:{allocatedEndpoint.Port}",
364
if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.
TargetHost
))
ProjectResourceBuilderExtensions.cs (2)
693
launchDefaults.KestrelEndpointAnnotationHosts[e] = e.
TargetHost
;
1116
aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.
TargetHost
}:{e.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
550
if (!EndpointHostHelpers.IsLocalhostOrLocalhostTld(targetEndpointAnnotation.
TargetHost
))
553
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)
296
c.Args.Add(endpoint.EndpointAnnotation.
TargetHost
);
Aspire.Hosting.Tests (9)
Dashboard\DashboardResourceTests.cs (6)
217
Assert.Equal("localhost", otlpGrpcEndpoint.
TargetHost
);
220
Assert.Equal("localhost", otlpHttpEndpoint.
TargetHost
);
248
Assert.Equal("localhost", otlpGrpcEndpoint.
TargetHost
);
251
Assert.Equal("localhost", otlpHttpEndpoint.
TargetHost
);
290
Assert.Equal(expectedTargetHost, otlpGrpcEndpoint.
TargetHost
);
291
Assert.Equal(expectedTargetHost, otlpHttpEndpoint.
TargetHost
);
ProjectResourceTests.cs (2)
730
Assert.Equal("*", e.
TargetHost
);
736
Assert.Equal("*", e.
TargetHost
);
WithUrlsTests.cs (1)
559
endpoint.AllocatedEndpoint = new(endpoint, endpoint.
TargetHost
, endpoint.Port ?? endpoint.TargetPort ?? startingPort++);