22 writes to Url
Aspire.Hosting (9)
ApplicationModel\ResourceUrlAnnotation.cs (1)
45
Url
= Url,
Orchestrator\ApplicationOrchestrator.cs (4)
221
var url = new ResourceUrlAnnotation {
Url
= allocatedEndpoint.UriString, Endpoint = endpointReference };
236
Url
= $"{allocatedEndpoint.UriScheme}://{endpoint.TargetHost}:{allocatedEndpoint.Port}",
245
Url
= $"{allocatedEndpoint.UriScheme}://{Environment.MachineName}:{allocatedEndpoint.Port}",
278
url.
Url
= allocatedEndpoint.UriString.TrimEnd('/') + url.Url;
ProjectResourceBuilderExtensions.cs (2)
480
url.
Url
= launchProfile.LaunchUrl;
486
url.
Url
= (new Uri(baseUri, launchUri)).ToString();
ResourceBuilderExtensions.cs (2)
934
return builder.WithAnnotation(new ResourceUrlAnnotation {
Url
= url, DisplayText = displayText });
983
c.Urls.Add(new() { Endpoint = endpoint,
Url
= urlValue, DisplayText = displayText });
Aspire.Hosting.Qdrant (1)
QdrantBuilderExtensions.cs (1)
97
.WithUrlForEndpoint(QdrantServerResource.HttpEndpointName, e => new ResourceUrlAnnotation() {
Url
= "/dashboard", DisplayText = "Qdrant Dashboard" });
Aspire.Hosting.Tests (10)
WithUrlsTests.cs (10)
140
.WithUrls(c => c.Urls.Add(new() {
Url
= "https://example.com", DisplayText = "Example" }))
291
u.
Url
= "https://example.com";
321
.WithUrlForEndpoint("http", u => u.
Url
= "https://example.com");
609
c.Urls.Add(new() {
Url
= "http://example.com/", DisplayLocation = UrlDisplayLocation.SummaryAndDetails });
610
c.Urls.Add(new() {
Url
= "http://example.com/internal", DisplayLocation = UrlDisplayLocation.DetailsOnly });
611
c.Urls.Add(new() {
Url
= "http://example.com/out-of-range", DisplayLocation = (UrlDisplayLocation)100 });
690
return new() {
Url
= "https://example.com" };
717
url.
Url
= "/sub-path";
747
return new() {
Url
= "/sub-path" };
777
c.Urls.Add(new() { Endpoint = c.GetEndpoint("test"),
Url
= "/sub-path" });
Stress.AppHost (1)
Program.cs (1)
90
.WithUrls(c => c.Urls.Add(new() {
Url
= "https://someplace.com", DisplayText = "Some place" }))
TestShop.AppHost (1)
Program.cs (1)
75
.WithUrlForEndpoint("https", ep => new() {
Url
= "/health", DisplayText = "Health", DisplayLocation = UrlDisplayLocation.DetailsOnly })
31 references to Url
Aspire.Hosting (9)
ApplicationModel\ResourceUrlAnnotation.cs (1)
45
Url =
Url
,
Dcp\ResourceSnapshotBuilder.cs (2)
252
urls.Add(new(Name: endpointUrl.Endpoint!.EndpointName, Url: endpointUrl.
Url
, IsInternal: endpointUrl.IsInternal) { IsInactive = isInactive, DisplayProperties = new(endpointUrl.DisplayText ?? "", endpointUrl.DisplayOrder ?? 0) });
260
urls.Add(new(Name: null, Url: url.
Url
, IsInternal: url.IsInternal) { IsInactive = !resourceRunning, DisplayProperties = new(url.DisplayText ?? "", url.DisplayOrder ?? 0) });
Orchestrator\ApplicationOrchestrator.cs (5)
141
urls = resourceUrls.Select(url => new UrlSnapshot(Name: url.Endpoint?.EndpointName, Url: url.
Url
, IsInternal: url.DisplayLocation == UrlDisplayLocation.DetailsOnly)
276
if (url.
Url
.StartsWith('/') && endpoint.AllocatedEndpoint is { } allocatedEndpoint)
278
url.Url = allocatedEndpoint.UriString.TrimEnd('/') + url.
Url
;
289
if (!urls.Any(url => url.
Url
.Equals(existingUrl.
Url
, StringComparison.OrdinalIgnoreCase) && url.Endpoint == existingUrl.Endpoint))
ProjectResourceBuilderExtensions.cs (1)
485
var baseUri = new Uri(url.
Url
);
Aspire.Hosting.Qdrant.Tests (1)
QdrantFunctionalTests.cs (1)
245
Assert.Single(urls, u => u.DisplayText == "Qdrant Dashboard" && u.
Url
.EndsWith("/dashboard"));
Aspire.Hosting.Tests (21)
WithEndpointTests.cs (4)
640
url => Assert.StartsWith("https://localhost:", url.
Url
),
641
url => Assert.StartsWith("https://example.localhost:", url.
Url
));
674
url => Assert.StartsWith("https://localhost:", url.
Url
),
675
url => Assert.StartsWith($"https://{Environment.MachineName}:", url.
Url
));
WithUrlsTests.cs (17)
152
Assert.Single(urls, u => u.
Url
== "https://example.com" && u.DisplayText == "Example");
176
Assert.Single(urls, u => u.
Url
== "https://example.com" && u.DisplayText == "Example");
204
u => Assert.True(u.
Url
== endpointUrl.
Url
&& u.DisplayText is null),
205
u => Assert.True(u.
Url
.EndsWith("/test") && u.DisplayText == "Example")
230
Assert.Single(urls, u => u.
Url
.StartsWith("http://localhost") && u.Endpoint?.EndpointName == "test");
253
Assert.Single(urls, u => u.
Url
.EndsWith("/sub-path") && u.Endpoint?.EndpointName == "http");
276
Assert.Single(urls, u => u.
Url
== "http://custom.localhost:23456/home" && u.Endpoint?.EndpointName == "http");
307
u.
Url
== "https://example.com"
732
Assert.True(endpointUrl.
Url
.StartsWith("http://localhost") && endpointUrl.
Url
.EndsWith("/sub-path"));
759
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test" && u.
Url
.EndsWith("/sub-path"));
762
Assert.True(endpointUrl.
Url
.StartsWith("http://localhost") && endpointUrl.
Url
.EndsWith("/sub-path"));
789
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test" && u.
Url
.EndsWith("/sub-path"));
792
Assert.True(endpointUrl.
Url
.StartsWith("http://localhost") && endpointUrl.
Url
.EndsWith("/sub-path"));