2 writes to EndpointName
Aspire.Hosting (2)
ApplicationModel\EndpointReference.cs (2)
125EndpointName = endpoint.Name; 140EndpointName = endpointName;
45 references to EndpointName
Aspire.Hosting (22)
ApplicationModel\EndpointReference.cs (7)
18internal EndpointAnnotation EndpointAnnotation => GetEndpointAnnotation() ?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not defined for the resource `{Resource.Name}`."); 59_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{EndpointName}'.") 62string Binding(string prop) => $"{{{Resource.Name}.bindings.{EndpointName}.{prop}}}"; 93public string ContainerHost => AllocatedEndpoint.ContainerHostAddress ?? throw new InvalidOperationException($"The endpoint \"{EndpointName}\" has no associated container host name."); 107?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not allocated for the resource `{Resource.Name}`."); 110_endpointAnnotation ??= Resource.Annotations.OfType<EndpointAnnotation>().SingleOrDefault(a => StringComparers.EndpointAnnotationName.Equals(a.Name, EndpointName)); 182_ => throw new InvalidOperationException($"The property '{Property}' is not supported for the endpoint '{Endpoint.EndpointName}'.")
ApplicationModel\ExpressionResolver.cs (1)
19static string EndpointUniqueName(EndpointReference endpointReference) => $"{endpointReference.Resource.Name}/{endpointReference.EndpointName}";
Dcp\ResourceSnapshotBuilder.cs (2)
211var urlsForEndpoint = endpointUrls.Where(u => string.Equals(endpointName, u.Endpoint?.EndpointName, StringComparisons.EndpointAnnotationName)).ToList(); 218urls.Add(new(Name: endpointUrl.Endpoint!.EndpointName, Url: endpointUrl.Url, IsInternal: endpointUrl.IsInternal) { IsInactive = isInactive, DisplayProperties = new(endpointUrl.DisplayText ?? "", endpointUrl.DisplayOrder ?? 0) });
Orchestrator\ApplicationOrchestrator.cs (1)
122urls = resourceUrls.Select(url => new UrlSnapshot(Name: url.Endpoint?.EndpointName, Url: url.Url, IsInternal: url.DisplayLocation == UrlDisplayLocation.DetailsOnly)
ProjectResourceBuilderExtensions.cs (1)
473var url = context.Urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, endpoint.Name, StringComparisons.EndpointAnnotationName));
ResourceBuilderExtensions.cs (10)
344var endpointName = endpoint.EndpointName; 456ApplyEndpoints(builder, endpointReference.Resource, endpointReference.EndpointName); 914var urlForEndpoint = context.Urls.FirstOrDefault(u => u.Endpoint?.EndpointName == endpointName); 1307throw new DistributedApplicationException($"Could not create HTTP health check for resource '{builder.Resource.Name}' as the endpoint with name '{endpoint.EndpointName}' and scheme '{endpoint.Scheme}' is not an HTTP endpoint."); 1313var endpointName = endpoint.EndpointName; 1659throw new DistributedApplicationException($"Could not create HTTP command for resource '{builder.Resource.Name}' as the endpoint with name '{endpoint.EndpointName}' and scheme '{endpoint.Scheme}' is not an HTTP endpoint."); 1667commandName ??= $"{endpoint.Resource.Name}-{endpoint.EndpointName}-http-{commandOptions.Method.Method.ToLowerInvariant()}-{path}"; 1762matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.EndpointName, name, StringComparisons.EndpointAnnotationName)); 1767throw new DistributedApplicationException($"Could not create {errorDisplayNoun} for resource '{builder.Resource.Name}' as the endpoint with name '{matchingEndpoint.EndpointName}' and scheme '{matchingEndpoint.Scheme}' is not an HTTP endpoint."); 1788matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.EndpointName, scheme, StringComparisons.EndpointAnnotationUriScheme));
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppContext.cs (2)
496var mapping = context._endpointMapping[ep.EndpointName]; 548var mapping = context._endpointMapping[epExpr.Endpoint.EndpointName];
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
118return (GetValue(context._endpointMapping[ep.EndpointName], EndpointProperty.Url), secretType); 155var mapping = context._endpointMapping[epExpr.Endpoint.EndpointName];
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
350var url = context.Urls.FirstOrDefault(u => u.Endpoint?.EndpointName == KnownUrls.DataExplorer.EndpointName);
Aspire.Hosting.Docker (2)
DockerComposeServiceResourceExtensions.cs (2)
24var mapping = referencedResource.EndpointMappings[ep.EndpointName]; 52var mapping = referencedResource.EndpointMappings[epExpr.Endpoint.EndpointName];
Aspire.Hosting.Kubernetes (2)
KubernetesServiceResourceExtensions.cs (2)
28var mapping = referencedResource.EndpointMappings[ep.EndpointName]; 58var mapping = referencedResource.EndpointMappings[epExpr.Endpoint.EndpointName];
Aspire.Hosting.Qdrant.Tests (2)
QdrantFunctionalTests.cs (2)
242Assert.Single(urls, u => u.Endpoint?.EndpointName == "grpc" && u.DisplayText == "Qdrant (GRPC)" && u.DisplayLocation == UrlDisplayLocation.DetailsOnly); 243Assert.Single(urls, u => u.Endpoint?.EndpointName == "http" && u.DisplayText == "Qdrant (HTTP)");
Aspire.Hosting.Tests (11)
WithUrlsTests.cs (11)
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"); 316&& u.Endpoint?.EndpointName == "test" 355Assert.Single(initialUrlSnapshot, s => s.Name == httpEndpoint.EndpointName && s.IsInactive && s.Url == "https://example.com"); 392s => Assert.True(s.Name == httpEndpoint.EndpointName && s.DisplayProperties.DisplayName == ""), // <-- this is the default URL added for the endpoint 393s => Assert.True(s.Name == httpEndpoint.EndpointName && s.Url.EndsWith("/one") && s.DisplayProperties.DisplayName == "Example 1"), 394s => Assert.True(s.Name == httpEndpoint.EndpointName && s.Url.EndsWith("/two") && s.DisplayProperties.DisplayName == "Example 2") 576var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test"); 607var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test" && u.Url.EndsWith("/sub-path")); 638var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.EndpointName == "test" && u.Url.EndsWith("/sub-path"));
TestShop.AppHost (1)
Program.cs (1)
70.WithUrls(c => c.Urls.ForEach(u => u.DisplayText = $"Online store ({u.Endpoint?.EndpointName})"))