20 writes to Url
Aspire.Hosting (7)
ApplicationModel\ResourceUrlAnnotation.cs (1)
45Url = Url,
Orchestrator\ApplicationOrchestrator.cs (2)
194var url = new ResourceUrlAnnotation { Url = allocatedEndpoint.UriString, Endpoint = new EndpointReference(resourceWithEndpoints, endpoint) }; 231url.Url = allocatedEndpoint.UriString.TrimEnd('/') + url.Url;
ProjectResourceBuilderExtensions.cs (2)
479url.Url = launchProfile.LaunchUrl; 485url.Url = (new Uri(baseUri, launchUri)).ToString();
ResourceBuilderExtensions.cs (2)
817return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(c => c.Urls.Add(new() { Url = url, DisplayText = displayText }))); 866c.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" })); 296u.Url = "https://example.com"; 328.WithUrlForEndpoint("http", u => u.Url = "https://example.com"); 453c.Urls.Add(new() { Url = "http://example.com/", DisplayLocation = UrlDisplayLocation.SummaryAndDetails }); 454c.Urls.Add(new() { Url = "http://example.com/internal", DisplayLocation = UrlDisplayLocation.DetailsOnly }); 455c.Urls.Add(new() { Url = "http://example.com/out-of-range", DisplayLocation = (UrlDisplayLocation)100 }); 534return new() { Url = "https://example.com" }; 562url.Url = "/sub-path"; 593return new() { Url = "/sub-path" }; 624c.Urls.Add(new() { Endpoint = c.GetEndpoint("test"), Url = "/sub-path" });
Stress.AppHost (1)
Program.cs (1)
81.WithUrls(c => c.Urls.Add(new() { Url = "https://someplace.com", DisplayText = "Some place" }))
TestShop.AppHost (1)
Program.cs (1)
74.WithUrlForEndpoint("https", ep => new() { Url = "/health", DisplayText = "Health", DisplayLocation = UrlDisplayLocation.DetailsOnly })
25 references to Url
Aspire.Hosting (7)
ApplicationModel\ResourceUrlAnnotation.cs (1)
45Url = Url,
Dcp\ResourceSnapshotBuilder.cs (2)
218urls.Add(new(Name: endpointUrl.Endpoint!.EndpointName, Url: endpointUrl.Url, IsInternal: endpointUrl.IsInternal) { IsInactive = isInactive, DisplayProperties = new(endpointUrl.DisplayText ?? "", endpointUrl.DisplayOrder ?? 0) }); 226urls.Add(new(Name: null, Url: url.Url, IsInternal: url.IsInternal) { IsInactive = !resourceRunning, DisplayProperties = new(url.DisplayText ?? "", url.DisplayOrder ?? 0) });
Orchestrator\ApplicationOrchestrator.cs (3)
122urls = resourceUrls.Select(url => new UrlSnapshot(Name: url.Endpoint?.EndpointName, Url: url.Url, IsInternal: url.DisplayLocation == UrlDisplayLocation.DetailsOnly) 229if (url.Url.StartsWith('/') && endpoint.AllocatedEndpoint is { } allocatedEndpoint) 231url.Url = allocatedEndpoint.UriString.TrimEnd('/') + url.Url;
ProjectResourceBuilderExtensions.cs (1)
484var baseUri = new Uri(url.Url);
Aspire.Hosting.Qdrant.Tests (1)
QdrantFunctionalTests.cs (1)
244Assert.Single(urls, u => u.DisplayText == "Qdrant Dashboard" && u.Url.EndsWith("/dashboard"));
Aspire.Hosting.Tests (17)
WithUrlsTests.cs (17)
154Assert.Single(urls, u => u.Url == "https://example.com" && u.DisplayText == "Example"); 179Assert.Single(urls, u => u.Url == "https://example.com" && u.DisplayText == "Example"); 207u => Assert.True(u.Url == endpointUrl.Url && u.DisplayText is null), 208u => Assert.True(u.Url.EndsWith("/test") && u.DisplayText == "Example") 234Assert.Single(urls, u => u.Url.StartsWith("http://localhost") && u.Endpoint?.EndpointName == "test"); 258Assert.Single(urls, u => u.Url.EndsWith("/sub-path") && u.Endpoint?.EndpointName == "http"); 282Assert.Single(urls, u => u.Url == "http://custom.localhost:23456/home" && u.Endpoint?.EndpointName == "http"); 314u.Url == "https://example.com" 579Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path")); 607var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test" && u.Url.EndsWith("/sub-path")); 610Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path")); 638var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test" && u.Url.EndsWith("/sub-path")); 641Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path"));