ApiConventionTypeAttribute クラス

定義

MVC コントローラーまたは 1 つのコントローラーを含むアセンブリに適用される API 規則。

API 規則は、ApiExplorer の出力に影響を与えるために使用されます。 規則は静的型である必要があります。 規則内のメソッドは、メソッド名またはそのパラメーターに適用でき、パラメーターに適用される によって指定された ApiConventionNameMatchAttribute ルールを使用して、アクション メソッドと ApiConventionTypeMatchAttribute 照合されます。

動作を指定する属性が見つからない場合、MVC は メソッド名と一致し、 を使用してパラメーター名が一致し、 を使用してExactAssignableFromパラメーター型が一致します。

public ref class ApiConventionTypeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ApiConventionTypeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ApiConventionTypeAttribute = class
    inherit Attribute
Public NotInheritable Class ApiConventionTypeAttribute
Inherits Attribute
継承
ApiConventionTypeAttribute
属性

コンストラクター

ApiConventionTypeAttribute(Type)

を使用してインスタンスをApiConventionTypeAttributeconventionType初期化します。

プロパティ

ConventionType

規則の種類を取得します。

適用対象