EndpointNameAttribute 類別

定義

在 中 Metadata 指定端點名稱。

[System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public sealed class EndpointNameAttribute : Attribute, Microsoft.AspNetCore.Routing.IEndpointNameMetadata
[<System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type EndpointNameAttribute = class
    inherit Attribute
    interface IEndpointNameMetadata
Public NotInheritable Class EndpointNameAttribute
Inherits Attribute
Implements IEndpointNameMetadata
繼承
EndpointNameAttribute
屬性
實作

備註

端點名稱在應用程式內必須是唯一的,而且可用來明確識別所需的端點,以便使用 產生 URI LinkGenerator

建構函式

EndpointNameAttribute(String)

初始化 EndpointNameAttribute 的實例。

屬性

EndpointName

取得端點名稱。

適用於