FilterCollection.Add Method

Definition

Overloads

Add(Type)

Adds a type representing a IFilterMetadata.

Add(Type, Int32)

Adds a type representing a IFilterMetadata.

Add<TFilterType>()

Adds a type representing a IFilterMetadata.

Add<TFilterType>(Int32)

Adds a type representing a IFilterMetadata.

Add(Type)

Source:
FilterCollection.cs
Source:
FilterCollection.cs

Adds a type representing a 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

Parameters

filterType
Type

Type representing a IFilterMetadata.

Returns

A IFilterMetadata representing the added type.

Remarks

Filter instances will be created using ActivatorUtilities. Use AddService(Type) to register a service as a filter. The added filter will be assigned an order of 0.

Applies to

Add(Type, Int32)

Source:
FilterCollection.cs
Source:
FilterCollection.cs

Adds a type representing a 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

Parameters

filterType
Type

Type representing a IFilterMetadata.

order
Int32

The order of the added filter.

Returns

A IFilterMetadata representing the added type.

Remarks

Filter instances will be created using ActivatorUtilities. Use AddService(Type) to register a service as a filter.

Applies to

Add<TFilterType>()

Source:
FilterCollection.cs
Source:
FilterCollection.cs

Adds a type representing a 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

Type Parameters

TFilterType

Type representing a IFilterMetadata.

Returns

A IFilterMetadata representing the added type.

Remarks

Filter instances will be created using ActivatorUtilities. Use AddService(Type) to register a service as a filter. The added filter will be assigned an order of 0.

Applies to

Add<TFilterType>(Int32)

Source:
FilterCollection.cs
Source:
FilterCollection.cs

Adds a type representing a 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

Type Parameters

TFilterType

Type representing a IFilterMetadata.

Parameters

order
Int32

The order of the added filter.

Returns

A IFilterMetadata representing the added type.

Remarks

Filter instances will be created using ActivatorUtilities. Use AddService(Type) to register a service as a filter.

Applies to