ResourceExtensions.GetEndpoints(IResourceWithEndpoints) Method

Definition

Gets the endpoints for the specified resource.

C#
public static System.Collections.Generic.IEnumerable<Aspire.Hosting.ApplicationModel.EndpointReference> GetEndpoints(this Aspire.Hosting.ApplicationModel.IResourceWithEndpoints resource);

Parameters

resource
IResourceWithEndpoints

The IResourceWithEndpoints which contains EndpointAnnotation annotations.

Returns

An enumeration of EndpointReference based on the EndpointAnnotation annotations from the resources' Annotations collection.

Applies to

Product Versions
.NET Aspire 8.0.0, 9.0.0, 9.1.0