Bagikan melalui


ApiConventionMethodAttribute(Type, String) Konstruktor

Definisi

Menginisialisasi instans ApiConventionMethodAttribute menggunakan conventionType dan yang ditentukan methodName.

public:
 ApiConventionMethodAttribute(Type ^ conventionType, System::String ^ methodName);
public ApiConventionMethodAttribute (Type conventionType, string methodName);
new Microsoft.AspNetCore.Mvc.ApiConventionMethodAttribute : Type * string -> Microsoft.AspNetCore.Mvc.ApiConventionMethodAttribute
Public Sub New (conventionType As Type, methodName As String)

Parameter

conventionType
Type

Dari Type konvensi.

Konvensi harus jenis statis. Metode dalam konvensi dicocokkan dengan metode tindakan menggunakan aturan yang ditentukan oleh ApiConventionNameMatchAttribute yang dapat diterapkan ke nama metode atau parameternya dan ApiConventionTypeMatchAttribute yang diterapkan ke parameter.

methodName
String

Nama metode.

Berlaku untuk