Поделиться через


ResourceBuilderExtensions.GetEndpoint Method

Definition

Overloads

GetEndpoint<T>(IResourceBuilder<T>, String)

Gets an EndpointReference by name from the resource. These endpoints are declared either using WithEndpoint<T>(IResourceBuilder<T>, Nullable<Int32>, Nullable<Int32>, String, String, String, Boolean, Nullable<Boolean>, Nullable<ProtocolType>) or by launch settings (for project resources). The EndpointReference can be used to resolve the address of the endpoint in WithEnvironment<T>(IResourceBuilder<T>, Action<EnvironmentCallbackContext>).

GetEndpoint<T>(IResourceBuilder<T>, String, NetworkIdentifier)

Gets an EndpointReference by name from the resource. These endpoints are declared either using WithEndpoint<T>(IResourceBuilder<T>, Nullable<Int32>, Nullable<Int32>, String, String, String, Boolean, Nullable<Boolean>, Nullable<ProtocolType>) or by launch settings (for project resources). The EndpointReference can be used to resolve the address of the endpoint in WithEnvironment<T>(IResourceBuilder<T>, Action<EnvironmentCallbackContext>).

GetEndpoint<T>(IResourceBuilder<T>, String)

Source:
ResourceBuilderExtensions.cs
Source:
ResourceBuilderExtensions.cs
Source:
ResourceBuilderExtensions.cs
Source:
ResourceBuilderExtensions.cs
Source:
ResourceBuilderExtensions.cs
Source:
ResourceBuilderExtensions.cs
Source:
ResourceBuilderExtensions.cs

Gets an EndpointReference by name from the resource. These endpoints are declared either using WithEndpoint<T>(IResourceBuilder<T>, Nullable<Int32>, Nullable<Int32>, String, String, String, Boolean, Nullable<Boolean>, Nullable<ProtocolType>) or by launch settings (for project resources). The EndpointReference can be used to resolve the address of the endpoint in WithEnvironment<T>(IResourceBuilder<T>, Action<EnvironmentCallbackContext>).

public static Aspire.Hosting.ApplicationModel.EndpointReference GetEndpoint<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string name) where T : Aspire.Hosting.ApplicationModel.IResourceWithEndpoints;
static member GetEndpoint : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)> * string -> Aspire.Hosting.ApplicationModel.EndpointReference (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)
<Extension()>
Public Function GetEndpoint(Of T As IResourceWithEndpoints) (builder As IResourceBuilder(Of T), name As String) As EndpointReference

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The the resource builder.

name
String

The name of the endpoint.

Returns

An EndpointReference that can be used to resolve the address of the endpoint after resource allocation has occurred.

Applies to

GetEndpoint<T>(IResourceBuilder<T>, String, NetworkIdentifier)

Source:
ResourceBuilderExtensions.cs

Gets an EndpointReference by name from the resource. These endpoints are declared either using WithEndpoint<T>(IResourceBuilder<T>, Nullable<Int32>, Nullable<Int32>, String, String, String, Boolean, Nullable<Boolean>, Nullable<ProtocolType>) or by launch settings (for project resources). The EndpointReference can be used to resolve the address of the endpoint in WithEnvironment<T>(IResourceBuilder<T>, Action<EnvironmentCallbackContext>).

public static Aspire.Hosting.ApplicationModel.EndpointReference GetEndpoint<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string name, Aspire.Hosting.ApplicationModel.NetworkIdentifier contextNetworkID) where T : Aspire.Hosting.ApplicationModel.IResourceWithEndpoints;
static member GetEndpoint : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)> * string * Aspire.Hosting.ApplicationModel.NetworkIdentifier -> Aspire.Hosting.ApplicationModel.EndpointReference (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)
<Extension()>
Public Function GetEndpoint(Of T As IResourceWithEndpoints) (builder As IResourceBuilder(Of T), name As String, contextNetworkID As NetworkIdentifier) As EndpointReference

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The the resource builder.

name
String

The name of the endpoint.

contextNetworkID
NetworkIdentifier

The network context in which to resolve the endpoint. If null, localhost (loopback) network context will be used.

Returns

An EndpointReference that can be used to resolve the address of the endpoint after resource allocation has occurred.

Applies to