DefaultTypeBasedExcludeFilter Class

Summary

Provides an implementation of [Microsoft.AspNet.Mvc.ModelBinding.Validation.IExcludeTypeValidationFilter](Microsoft.AspNet.Mvc.ModelBinding.Validation.IExcludeTypeValidationFilter.yml) which can filter based on a type.

Syntax

public class DefaultTypeBasedExcludeFilter : IExcludeTypeValidationFilter

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ModelBinding.Validation.DefaultTypeBasedExcludeFilter

Constructors

DefaultTypeBasedExcludeFilter(System.Type)

Creates a new instance of [Microsoft.AspNet.Mvc.ModelBinding.Validation.DefaultTypeBasedExcludeFilter](Microsoft.AspNet.Mvc.ModelBinding.Validation.DefaultTypeBasedExcludeFilter.yml).

Arguments:
  • type (System.Type) – The type which needs to be excluded.
public DefaultTypeBasedExcludeFilter(Type type)

Properties

ExcludedType()

Gets the type which is excluded from validation.

Return type:System.Type
public Type ExcludedType { get; }

Methods

IsTypeExcluded(System.Type)
Arguments:
  • propertyType (System.Type) –
Return type:

System.Boolean

public bool IsTypeExcluded(Type propertyType)