ApiConventionTypeAttribute 클래스

정의

MVC 컨트롤러 또는 단일 컨트롤러를 포함하는 어셈블리에 적용할 API 규칙입니다.

API 규칙은 ApiExplorer의 출력에 영향을 주는 데 사용됩니다. 규칙은 정적 형식이어야 합니다. 규칙의 메서드는 메서드 이름 또는 해당 매개 변수에 적용될 수 있고 매개 변수에 ApiConventionNameMatchAttribute 적용되는 에 지정된 규칙을 사용하여 작업 메서드와 ApiConventionTypeMatchAttribute 일치합니다.

동작을 지정하는 특성을 찾을 수 없는 경우 MVC는 메서드 이름과 일치하고 매개 변수 이름은 를 사용하여 Exact 일치하고 매개 변수 형식은 를 사용하여 AssignableFrom일치합니다.

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)

를 사용하여 conventionTypeinstance 초기화합니다 ApiConventionTypeAttribute .

속성

ConventionType

규칙 유형을 가져옵니다.

적용 대상