Table of Contents

Class ModelValidatorProviderCollection

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

No content here will be updated; please do not add material here.

public class ModelValidatorProviderCollection : Collection<ModelValidatorProvider>, IList<ModelValidatorProvider>, ICollection<ModelValidatorProvider>, IList, ICollection, IReadOnlyList<ModelValidatorProvider>, IReadOnlyCollection<ModelValidatorProvider>, IEnumerable<ModelValidatorProvider>, IEnumerable
Inheritance
ModelValidatorProviderCollection
Implements
Inherited Members

Constructors

ModelValidatorProviderCollection()

Initializes a new instance of the ModelValidatorProviderCollection class.

public ModelValidatorProviderCollection()

ModelValidatorProviderCollection(IList<ModelValidatorProvider>)

Initializes a new instance of the ModelValidatorProviderCollection class using a list of model-validation providers.

public ModelValidatorProviderCollection(IList<ModelValidatorProvider> list)

Parameters

list IList<ModelValidatorProvider>

A list of model-validation providers.

Methods

ClearItems()

Removes all elements from the collection.

protected override void ClearItems()

GetValidators(ModelMetadata, ControllerContext)

Returns the list of model validators.

public IEnumerable<ModelValidator> GetValidators(ModelMetadata metadata, ControllerContext context)

Parameters

metadata ModelMetadata

The model metadata.

context ControllerContext

The controller context.

Returns

IEnumerable<ModelValidator>

The list of model validators.

InsertItem(int, ModelValidatorProvider)

Inserts a model-validator provider into the collection.

protected override void InsertItem(int index, ModelValidatorProvider item)

Parameters

index int

The zero-based index at which item should be inserted.

item ModelValidatorProvider

The model-validator provider object to insert.

RemoveItem(int)

Removes the element at the specified index of the collection.

protected override void RemoveItem(int index)

Parameters

index int

The zero-based index of the element to remove.

SetItem(int, ModelValidatorProvider)

Replaces the model-validator provider element at the specified index.

protected override void SetItem(int index, ModelValidatorProvider item)

Parameters

index int

The zero-based index of the model-validator provider element to replace.

item ModelValidatorProvider

The new value for the model-validator provider element.