HttpMethodAttribute Sınıf

Tanım

Belirli bir HTTP yöntemleri kümesi destekleyen bir eylemi tanımlar.

public ref class HttpMethodAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Routing::IActionHttpMethodProvider, Microsoft::AspNetCore::Mvc::Routing::IRouteTemplateProvider
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class HttpMethodAttribute : Attribute, Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type HttpMethodAttribute = class
    inherit Attribute
    interface IActionHttpMethodProvider
    interface IRouteTemplateProvider
Public MustInherit Class HttpMethodAttribute
Inherits Attribute
Implements IActionHttpMethodProvider, IRouteTemplateProvider
Devralma
HttpMethodAttribute
Türetilmiş
Öznitelikler
Uygulamalar

Oluşturucular

HttpMethodAttribute(IEnumerable<String>)

Belirtilen HttpMethodAttribute HTTP yöntemleri kümesiyle yeni bir oluşturur. Desteklenen HTTP yöntemleri kümesi. Null olamaz.

HttpMethodAttribute(IEnumerable<String>, String)

Belirtilen yol HttpMethodAttribute şablonunda verilen HTTP yöntemleri kümesiyle yeni bir oluşturur.

Özellikler

HttpMethods

Bu eylem sağlayıcısının desteklediği http yöntemlerinin listesi.

Name

Yol adını alır. Yol adı, belirli bir yol değeri kümesine göre bir yol seçimine güvenmek yerine belirli bir yolu kullanarak bağlantı oluşturmak için kullanılabilir.

Order

Rota siparişlerini alır. Sıra, yol yürütmenin sıralamasını belirler. Daha düşük bir sipariş değerine sahip yollar önce denenr. Yol bir değer belirtmezse, denetleyicide bir değer tanımlamazsa değerini veya varsayılan Order değeri olan RouteAttribute 0'ın değerini alır.

Template

Yol şablonu. olabilir. null

Belirtik Arabirim Kullanımları

IRouteTemplateProvider.Order

Rota siparişlerini alır. Sıra, yol yürütmenin sıralamasını belirler. Daha düşük bir sipariş değerine sahip yollar önce denenr. Yol bir değer belirtmezse, varsayılan 0 değerini alır. Order özelliği için null değer, kullanıcının yol için açık bir sipariş belirtmesi anlamına gelir.

Şunlara uygulanır