ExceptionFilterAttribute Sınıf
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bir eylem oluşturulduktan sonra zaman uyumsuz olarak çalışan soyut bir Exceptionfiltre. Alt sınıfların her ikisini de geçersiz kılmalıdır veya OnExceptionAsync(ExceptionContext) geçersiz kılmamalıdırOnException(ExceptionContext).
public ref class ExceptionFilterAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Filters::IAsyncExceptionFilter, Microsoft::AspNetCore::Mvc::Filters::IExceptionFilter, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class ExceptionFilterAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ExceptionFilterAttribute = class
inherit Attribute
interface IAsyncExceptionFilter
interface IFilterMetadata
interface IExceptionFilter
interface IOrderedFilter
Public MustInherit Class ExceptionFilterAttribute
Inherits Attribute
Implements IAsyncExceptionFilter, IExceptionFilter, IOrderedFilter
- Devralma
-
ExceptionFilterAttribute
- Öznitelikler
- Uygulamalar
Oluşturucular
ExceptionFilterAttribute() |
Bir eylem oluşturulduktan sonra zaman uyumsuz olarak çalışan soyut bir Exceptionfiltre. Alt sınıfların her ikisini de geçersiz kılmalıdır veya OnExceptionAsync(ExceptionContext) geçersiz kılmamalıdırOnException(ExceptionContext). |
Özellikler
Order |
Filtrelerin yürütülmesinin sırasını belirlemek için sipariş değerini alır. Filtreler özelliğin artan sayısal değerinde Order yürütülür. |
Yöntemler
OnException(ExceptionContext) |
Eylem oluşturulduktan sonra çağrılır Exception. |
OnExceptionAsync(ExceptionContext) |
Eylem oluşturulduktan sonra çağrılır Exception. |
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin