ApiConventionMethodAttribute 類別

定義

要套用至控制器動作的 API 慣例。

API 慣例可用來影響 ApiExplorer 的輸出。 ApiConventionMethodAttribute 可用來指定適用于動作的確切慣例方法。 ApiConventionTypeAttribute 如需在元件或控制器層級套用慣例的詳細資訊。

public ref class ApiConventionMethodAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class ApiConventionMethodAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ApiConventionMethodAttribute = class
    inherit Attribute
Public NotInheritable Class ApiConventionMethodAttribute
Inherits Attribute
繼承
ApiConventionMethodAttribute
屬性

建構函式

ApiConventionMethodAttribute(Type, String)

ApiConventionMethodAttribute使用 conventionType 和指定的 methodName ,初始化 實例。

屬性

ConventionType

取得慣例類型。

適用於