Skip to content

Commit a4615e7

Browse files
Materialize Endpoints set in HostResourceWithEndpoints (#17092)
1 parent b8df57a commit a4615e7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Aspire.Hosting/Dcp/ContainerCreator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ internal record struct HostResourceWithEndpoints(
2828
{
2929
if (resource is IResourceWithEndpoints rwe && !resource.IsContainer())
3030
{
31-
var endpoints = resource.Annotations.OfType<EndpointAnnotation>();
32-
if (endpoints.Any())
31+
var endpoints = resource.Annotations.OfType<EndpointAnnotation>().ToArray();
32+
if (endpoints.Length > 0)
3333
{
3434
return new HostResourceWithEndpoints(rwe, endpoints);
3535
}

0 commit comments

Comments
 (0)