Freigeben über


ValueProviderDictionary Class

Note: This API is now obsolete.

Represents a dictionary of value providers for the application.

Inheritance Hierarchy

System.Object
  System.Web.Mvc.ValueProviderDictionary

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
<ObsoleteAttribute("The recommended alternative is to use one of the specific ValueProvider types, such as FormValueProvider.")> _
Public Class ValueProviderDictionary _
    Implements IDictionary(Of String, ValueProviderResult),  _
    ICollection(Of KeyValuePair(Of String, ValueProviderResult)), IEnumerable(Of KeyValuePair(Of String, ValueProviderResult)),  _
    IEnumerable, IValueProvider
[ObsoleteAttribute("The recommended alternative is to use one of the specific ValueProvider types, such as FormValueProvider.")]
public class ValueProviderDictionary : IDictionary<string, ValueProviderResult>, 
    ICollection<KeyValuePair<string, ValueProviderResult>>, IEnumerable<KeyValuePair<string, ValueProviderResult>>, 
    IEnumerable, IValueProvider
[ObsoleteAttribute(L"The recommended alternative is to use one of the specific ValueProvider types, such as FormValueProvider.")]
public ref class ValueProviderDictionary : IDictionary<String^, ValueProviderResult^>, 
    ICollection<KeyValuePair<String^, ValueProviderResult^>>, IEnumerable<KeyValuePair<String^, ValueProviderResult^>>, 
    IEnumerable, IValueProvider

The ValueProviderDictionary type exposes the following members.

Constructors

  Name Description
Public method ValueProviderDictionary Initializes a new instance of the ValueProviderDictionary class.

Top

Properties

  Name Description
Public property ControllerContext Gets or sets the controller context.
Public property Count Gets the number of elements in the collection.
Public property IsReadOnly Gets a value that indicates whether the collection is read-only.
Public property Item Gets or sets the ValueProviderResult object that has the specified key.
Public property Keys Gets a collection that contains the keys of the IDictionary<TKey, TValue> instance.
Public property Values Gets a collection that contains the values in the IDictionary<TKey, TValue> object.

Top

Methods

  Name Description
Public method Add(KeyValuePair<String, ValueProviderResult>) Adds the specified item to the collection of value providers.
Public method Add(String, Object) Adds an element that has the specified key and value to the collection of value providers.
Public method Add(String, ValueProviderResult) Adds an element that has the specified key and value to the collection of value providers.
Public method Clear Removes all items from the collection of value providers.
Public method Contains Determines whether the collection of value providers contains the specified item.
Public method ContainsKey Determines whether the collection of value providers contains an element that has the specified key.
Public method CopyTo Copies the elements of the collection to an array, starting at the specified index.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator Returns an enumerator that can be used to iterate through the collection.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove(KeyValuePair<String, ValueProviderResult>) Removes the first occurrence of the specified item from the collection of value providers.
Public method Remove(String) Removes the element that has the specified key from the collection of value providers.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetValue Gets the value of the element that has the specified key.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that can be used to iterate through a collection.
Explicit interface implemetationPrivate method IValueProvider.ContainsPrefix Determines whether the collection contains the specified prefix.
Explicit interface implemetationPrivate method IValueProvider.GetValue Returns a value object using the specified key.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Mvc Namespace