Share via


ResourceExtensions.ResolveEndpoints(IResource, IPortAllocator) Method

Definition

Resolves endpoint port configuration for the specified resource. Computes target ports and exposed ports based on resource type, endpoint configuration, and whether the endpoint is considered a default HTTP endpoint.

public static System.Collections.Generic.IReadOnlyList<Aspire.Hosting.ApplicationModel.ResolvedEndpoint> ResolveEndpoints(this Aspire.Hosting.ApplicationModel.IResource resource, Aspire.Hosting.ApplicationModel.IPortAllocator? portAllocator = default);
static member ResolveEndpoints : Aspire.Hosting.ApplicationModel.IResource * Aspire.Hosting.ApplicationModel.IPortAllocator -> System.Collections.Generic.IReadOnlyList<Aspire.Hosting.ApplicationModel.ResolvedEndpoint>
<Extension()>
Public Function ResolveEndpoints (resource As IResource, Optional portAllocator As IPortAllocator = Nothing) As IReadOnlyList(Of ResolvedEndpoint)

Parameters

resource
IResource

The resource containing endpoints to resolve.

portAllocator
IPortAllocator

Optional port allocator. If null, uses default allocation starting from port 8000.

Returns

A read-only list of resolved endpoints with computed port values.

Applies to