Table of Contents

Class ValueProviderCollection

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

Represents the collection of value-provider objects for the application.

public class ValueProviderCollection : Collection<IValueProvider>, IList<IValueProvider>, ICollection<IValueProvider>, IList, ICollection, IReadOnlyList<IValueProvider>, IReadOnlyCollection<IValueProvider>, IEnumerable<IValueProvider>, IEnumerable, IUnvalidatedValueProvider, IEnumerableValueProvider, IValueProvider
Inheritance
ValueProviderCollection
Implements
Inherited Members

Constructors

ValueProviderCollection()

Initializes a new instance of the ValueProviderCollection class.

public ValueProviderCollection()

ValueProviderCollection(IList<IValueProvider>)

Initializes a new instance of the ValueProviderCollection class and registers the specified value providers.

public ValueProviderCollection(IList<IValueProvider> list)

Parameters

list IList<IValueProvider>

The list of value providers to register.

Methods

ContainsPrefix(string)

Determines whether the collection contains the specified prefix.

public virtual bool ContainsPrefix(string prefix)

Parameters

prefix string

The prefix to search for.

Returns

bool

true if the collection contains the specified prefix; otherwise, false.

GetKeysFromPrefix(string)

Gets the keys using the specified prefix.

public virtual IDictionary<string, string> GetKeysFromPrefix(string prefix)

Parameters

prefix string

The prefix.

Returns

IDictionary<string, string>

They keys.

GetValue(string)

Returns a value object using the specified key.

public virtual ValueProviderResult GetValue(string key)

Parameters

key string

The key of the value object to retrieve.

Returns

ValueProviderResult

The value object for the specified key.

GetValue(string, bool)

Returns a value object using the specified key and skip-validation parameter.

public virtual ValueProviderResult GetValue(string key, bool skipValidation)

Parameters

key string

The key of the value object to retrieve.

skipValidation bool

true to specify that validation should be skipped; otherwise, false.

Returns

ValueProviderResult

The value object for the specified key.

InsertItem(int, IValueProvider)

Inserts the specified value-provider object into the collection at the specified index location.

protected override void InsertItem(int index, IValueProvider item)

Parameters

index int

The zero-based index location at which to insert the value provider into the collection.

item IValueProvider

The value-provider object to insert.

Exceptions

ArgumentNullException

The item parameter is null.

SetItem(int, IValueProvider)

Replaces the value provider at the specified index location with a new value provider.

protected override void SetItem(int index, IValueProvider item)

Parameters

index int

The zero-based index of the element to replace.

item IValueProvider

The new value for the element at the specified index.

Exceptions

ArgumentNullException

The item parameter is null.