2 writes to EndpointName
Aspire.Hosting (2)
ApplicationModel\EndpointReference.cs (2)
125
EndpointName
= endpoint.Name;
140
EndpointName
= endpointName;
46 references to EndpointName
Aspire.Hosting (22)
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
}";
Dcp\ResourceSnapshotBuilder.cs (2)
211
var urlsForEndpoint = endpointUrls.Where(u => string.Equals(endpointName, u.Endpoint?.
EndpointName
, StringComparisons.EndpointAnnotationName)).ToList();
218
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)
410
var endpointName = endpoint.
EndpointName
;
568
ApplyEndpoints(builder, endpointReference.Resource, endpointReference.
EndpointName
);
1026
var urlForEndpoint = context.Urls.FirstOrDefault(u => u.Endpoint?.
EndpointName
== endpointName);
1419
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.");
1425
var endpointName = endpoint.
EndpointName
;
1771
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.");
1779
commandName ??= $"{endpoint.Resource.Name}-{endpoint.
EndpointName
}-http-{commandOptions.Method.Method.ToLowerInvariant()}-{path}";
1874
matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.
EndpointName
, name, StringComparisons.EndpointAnnotationName));
1879
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.");
1900
matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.
EndpointName
, scheme, StringComparisons.EndpointAnnotationUriScheme));
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppContext.cs (2)
535
var mapping = context._endpointMapping[ep.
EndpointName
];
587
var mapping = context._endpointMapping[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
118
return (GetValue(context._endpointMapping[ep.
EndpointName
], EndpointProperty.Url), secretType);
155
var mapping = context._endpointMapping[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
355
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)
244
Assert.Single(urls, u => u.Endpoint?.
EndpointName
== "grpc" && u.DisplayText == "Qdrant (GRPC)" && u.DisplayLocation == UrlDisplayLocation.DetailsOnly);
245
Assert.Single(urls, u => u.Endpoint?.
EndpointName
== "http" && u.DisplayText == "Qdrant (HTTP)");
Aspire.Hosting.Tests (11)
WithUrlsTests.cs (11)
231
Assert.Single(urls, u => u.Url.StartsWith("http://localhost") && u.Endpoint?.
EndpointName
== "test");
254
Assert.Single(urls, u => u.Url.EndsWith("/sub-path") && u.Endpoint?.
EndpointName
== "http");
277
Assert.Single(urls, u => u.Url == "http://custom.localhost:23456/home" && u.Endpoint?.
EndpointName
== "http");
310
&& u.Endpoint?.
EndpointName
== "test"
349
Assert.Single(initialUrlSnapshot, s => s.Name == httpEndpoint.
EndpointName
&& s.IsInactive && s.Url == "https://example.com");
386
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.DisplayProperties.DisplayName == ""), // <-- this is the default URL added for the endpoint
387
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.Url.EndsWith("/one") && s.DisplayProperties.DisplayName == "Example 1"),
388
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.Url.EndsWith("/two") && s.DisplayProperties.DisplayName == "Example 2")
684
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test");
714
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test" && u.Url.EndsWith("/sub-path"));
744
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
})"))