Share via


FilterCollection.Add 方法

定義

多載

Add(Type)

加入表示 的 IFilterMetadata 型別。

Add(Type, Int32)

加入表示 的 IFilterMetadata 型別。

Add<TFilterType>()

加入表示 的 IFilterMetadata 型別。

Add<TFilterType>(Int32)

加入表示 的 IFilterMetadata 型別。

Add(Type)

來源:
FilterCollection.cs
來源:
FilterCollection.cs

加入表示 的 IFilterMetadata 型別。

public:
 Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata ^ Add(Type ^ filterType);
public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add (Type filterType);
override this.Add : Type -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Public Function Add (filterType As Type) As IFilterMetadata

參數

filterType
Type

表示 的型別 IFilterMetadata

傳回

IFilterMetadata 表示加入的類型。

備註

將會使用 ActivatorUtilities 來建立篩選實例。 使用 AddService(Type) 將服務註冊為篩選準則。 新增的篩選會指派 0 的順序。

適用於

Add(Type, Int32)

來源:
FilterCollection.cs
來源:
FilterCollection.cs

加入表示 的 IFilterMetadata 型別。

public:
 Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata ^ Add(Type ^ filterType, int order);
public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add (Type filterType, int order);
override this.Add : Type * int -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Public Function Add (filterType As Type, order As Integer) As IFilterMetadata

參數

filterType
Type

表示 的型別 IFilterMetadata

order
Int32

新增篩選的順序。

傳回

IFilterMetadata 表示加入的類型。

備註

將會使用 ActivatorUtilities 來建立篩選實例。 使用 AddService(Type) 將服務註冊為篩選準則。

適用於

Add<TFilterType>()

來源:
FilterCollection.cs
來源:
FilterCollection.cs

加入表示 的 IFilterMetadata 型別。

public:
generic <typename TFilterType>
 where TFilterType : Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata ^ Add();
public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add<TFilterType> () where TFilterType : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata;
override this.Add : unit -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata (requires 'FilterType :> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata)
Public Function Add(Of TFilterType As IFilterMetadata) () As IFilterMetadata

類型參數

TFilterType

表示 的型別 IFilterMetadata

傳回

IFilterMetadata 表示加入的類型。

備註

將會使用 ActivatorUtilities 來建立篩選實例。 使用 AddService(Type) 將服務註冊為篩選準則。 新增的篩選會指派 0 的順序。

適用於

Add<TFilterType>(Int32)

來源:
FilterCollection.cs
來源:
FilterCollection.cs

加入表示 的 IFilterMetadata 型別。

public:
generic <typename TFilterType>
 where TFilterType : Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata ^ Add(int order);
public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add<TFilterType> (int order) where TFilterType : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata;
override this.Add : int -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata (requires 'FilterType :> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata)
Public Function Add(Of TFilterType As IFilterMetadata) (order As Integer) As IFilterMetadata

類型參數

TFilterType

表示 的型別 IFilterMetadata

參數

order
Int32

新增篩選的順序。

傳回

IFilterMetadata 表示加入的類型。

備註

將會使用 ActivatorUtilities 來建立篩選實例。 使用 AddService(Type) 將服務註冊為篩選準則。

適用於