Share via


ApiConventionTypeAttribute Class

Definition

API conventions to be applied to an assembly containing MVC controllers or a single controller.

API conventions are used to influence the output of ApiExplorer. Conventions must be static types. Methods in a convention are matched to an action method using rules specified by ApiConventionNameMatchAttribute that may be applied to a method name or its parameters and ApiConventionTypeMatchAttribute that are applied to parameters.

When no attributes are found specifying the behavior, MVC matches method names and parameter names are matched using Exact and parameter types are matched using 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
Inheritance
ApiConventionTypeAttribute
Attributes

Constructors

ApiConventionTypeAttribute(Type)

Initializes an ApiConventionTypeAttribute instance using conventionType.

Properties

ConventionType

Gets the convention type.

Applies to