RoutingEndpointConventionBuilderExtensions.WithName<TBuilder> Metoda

Definicja

IEndpointNameMetadata Dodaje element do kolekcji Metadane dla wszystkich punktów końcowych utworzonych w obiekcie docelowymIEndpointConventionBuilder, biorąc pod uwagę endpointNameelement . Element IEndpointNameMetadata w punkcie końcowym jest używany do generowania linków i jest traktowany jako identyfikator operacji w specyfikacji OpenAPI danego punktu końcowego.

public static TBuilder WithName<TBuilder> (this TBuilder builder, string endpointName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member WithName : 'Builder * string -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function WithName(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, endpointName As String) As TBuilder

Parametry typu

TBuilder

Parametry

builder
TBuilder

Element IEndpointConventionBuilder.

endpointName
String

Nazwa punktu końcowego.

Zwraca

TBuilder

Element IEndpointConventionBuilder.

Dotyczy