DistributedApplicationHostingTestingExtensions.GetEndpointForNetwork Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the endpoint for the specified resource.
public static Uri GetEndpointForNetwork(this Aspire.Hosting.DistributedApplication app, string resourceName, Aspire.Hosting.ApplicationModel.NetworkIdentifier? networkIdentifier, string? endpointName = default);
static member GetEndpointForNetwork : Aspire.Hosting.DistributedApplication * string * Aspire.Hosting.ApplicationModel.NetworkIdentifier * string -> Uri
<Extension()>
Public Function GetEndpointForNetwork (app As DistributedApplication, resourceName As String, networkIdentifier As NetworkIdentifier, Optional endpointName As String = Nothing) As Uri
Parameters
The application.
- resourceName
- String
The resource name.
- networkIdentifier
- NetworkIdentifier
The optional network identifier. If none is specified, the default network is used.
- endpointName
- String
The optional endpoint name. If none are specified, the single defined endpoint is returned.
Returns
A URI representation of the endpoint.
Exceptions
The resource was not found, no matching endpoint was found, or multiple endpoints were found.
The resource has no endpoints.