2 writes to EndpointName
Aspire.Hosting (2)
ApplicationModel\EndpointReference.cs (2)
125
EndpointName
= endpoint.Name;
140
EndpointName
= endpointName;
47 references to EndpointName
Aspire.Hosting (23)
ApplicationModel\EndpointReference.cs (7)
18
internal 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
}'.")
62
string Binding(string prop) => $"{{{Resource.Name}.bindings.{
EndpointName
}.{prop}}}";
93
public 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)
19
static string EndpointUniqueName(EndpointReference endpointReference) => $"{endpointReference.Resource.Name}/{endpointReference.
EndpointName
}";
Dashboard\DashboardLifecycleHook.cs (1)
373
foreach (var e in dashboardResource.GetEndpoints().Where(e => e.
EndpointName
is "http" or "https"))
Dcp\ResourceSnapshotBuilder.cs (2)
245
var urlsForEndpoint = endpointUrls.Where(u => string.Equals(endpointName, u.Endpoint?.
EndpointName
, StringComparisons.EndpointAnnotationName)).ToList();
252
urls.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)
141
urls = resourceUrls.Select(url => new UrlSnapshot(Name: url.Endpoint?.
EndpointName
, Url: url.Url, IsInternal: url.DisplayLocation == UrlDisplayLocation.DetailsOnly)
ProjectResourceBuilderExtensions.cs (1)
474
var url = context.Urls.FirstOrDefault(u => string.Equals(u.Endpoint?.
EndpointName
, endpoint.Name, StringComparisons.EndpointAnnotationName));
ResourceBuilderExtensions.cs (10)
415
var endpointName = endpoint.
EndpointName
;
573
ApplyEndpoints(builder, endpointReference.Resource, endpointReference.
EndpointName
);
1031
var urlForEndpoint = context.Urls.FirstOrDefault(u => u.Endpoint?.
EndpointName
== endpointName);
1424
throw 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.");
1430
var endpointName = endpoint.
EndpointName
;
1776
throw 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.");
1784
commandName ??= $"{endpoint.Resource.Name}-{endpoint.
EndpointName
}-http-{commandOptions.Method.Method.ToLowerInvariant()}-{path}";
1879
matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.
EndpointName
, name, StringComparisons.EndpointAnnotationName));
1884
throw 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.");
1905
matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.
EndpointName
, scheme, StringComparisons.EndpointAnnotationUriScheme));
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppContext.cs (2)
536
var mapping = context._endpointMapping[ep.
EndpointName
];
588
var mapping = context._endpointMapping[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
119
return (GetValue(context._endpointMapping[ep.
EndpointName
], EndpointProperty.Url), secretType);
156
var mapping = context._endpointMapping[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
358
var url = context.Urls.FirstOrDefault(u => u.Endpoint?.
EndpointName
== KnownUrls.DataExplorer.EndpointName);
Aspire.Hosting.Docker (2)
DockerComposeServiceResourceExtensions.cs (2)
24
var mapping = referencedResource.EndpointMappings[ep.
EndpointName
];
52
var mapping = referencedResource.EndpointMappings[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Kubernetes (2)
KubernetesServiceResourceExtensions.cs (2)
28
var mapping = referencedResource.EndpointMappings[ep.
EndpointName
];
58
var mapping = referencedResource.EndpointMappings[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Qdrant.Tests (2)
QdrantFunctionalTests.cs (2)
243
Assert.Single(urls, u => u.Endpoint?.
EndpointName
== "grpc" && u.DisplayText == "Qdrant (GRPC)" && u.DisplayLocation == UrlDisplayLocation.DetailsOnly);
244
Assert.Single(urls, u => u.Endpoint?.
EndpointName
== "http" && u.DisplayText == "Qdrant (HTTP)");
Aspire.Hosting.Tests (11)
WithUrlsTests.cs (11)
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");
309
&& u.Endpoint?.
EndpointName
== "test"
348
Assert.Single(initialUrlSnapshot, s => s.Name == httpEndpoint.
EndpointName
&& s.IsInactive && s.Url == "https://example.com");
385
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.DisplayProperties.DisplayName == ""), // <-- this is the default URL added for the endpoint
386
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.Url.EndsWith("/one") && s.DisplayProperties.DisplayName == "Example 1"),
387
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.Url.EndsWith("/two") && s.DisplayProperties.DisplayName == "Example 2")
729
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test");
759
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test" && u.Url.EndsWith("/sub-path"));
789
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test" && u.Url.EndsWith("/sub-path"));
Aspire.Hosting.Yarp (1)
ConfigurationBuilder\YarpCluster.cs (1)
27
: this(endpoint.Resource.Name, $"{endpoint.Scheme}://_{endpoint.
EndpointName
}.{endpoint.Resource.Name}")
TestShop.AppHost (1)
Program.cs (1)
71
.WithUrls(c => c.Urls.ForEach(u => u.DisplayText = $"Online store ({u.Endpoint?.
EndpointName
})"))