Compartilhar via


ModelBinderDictionary Class

Represents a class that contains all model binders for the application, listed by binder type.

Inheritance Hierarchy

System.Object
  System.Web.Mvc.ModelBinderDictionary

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

Syntax

'Declaration
Public Class ModelBinderDictionary _
    Implements IDictionary(Of Type, IModelBinder),  _
    ICollection(Of KeyValuePair(Of Type, IModelBinder)), IEnumerable(Of KeyValuePair(Of Type, IModelBinder)),  _
    IEnumerable
public class ModelBinderDictionary : IDictionary<Type, IModelBinder>, 
    ICollection<KeyValuePair<Type, IModelBinder>>, IEnumerable<KeyValuePair<Type, IModelBinder>>, 
    IEnumerable
public ref class ModelBinderDictionary : IDictionary<Type^, IModelBinder^>, 
    ICollection<KeyValuePair<Type^, IModelBinder^>>, IEnumerable<KeyValuePair<Type^, IModelBinder^>>, 
    IEnumerable

The ModelBinderDictionary type exposes the following members.

Constructors

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

Top

Properties

  Name Description
Public property Count Gets the number of elements in the model binder dictionary.
Public property DefaultBinder Gets or sets the default model binder.
Public property IsReadOnly Gets a value that indicates whether the model binder dictionary is read-only.
Public property Item Gets or sets the specified key in an object that implements the IModelBinder interface.
Public property Keys Gets a collection that contains the keys in the model binder dictionary.
Public property Values Gets a collection that contains the values in the model binder dictionary.

Top

Methods

  Name Description
Public method Add(KeyValuePair<Type, IModelBinder>) Adds the specified item to the model binder dictionary.
Public method Add(Type, IModelBinder) Adds the specified item to the model binder dictionary using the specified key.
Public method Clear Removes all items from the model binder dictionary.
Public method Contains Determines whether the model binder dictionary contains a specified value.
Public method ContainsKey Determines whether the model binder dictionary contains an element that has the specified key.
Public method CopyTo Copies the elements of the model binder dictionary to an array, starting at a 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 GetBinder(Type) Retrieves the model binder for the specified type.
Public method GetBinder(Type, Boolean) Retrieves the model binder for the specified type or retrieves the default model binder.
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<Type, IModelBinder>) Removes the first occurrence of the specified element from the model binder dictionary.
Public method Remove(Type) Removes the element that has the specified key from the model binder dictionary.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetValue Gets the value that is associated with 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.

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