ModelBinderDictionary 类

定义

为应用程序的所有模型绑定器(按绑定器类型列出)提供容器。Provides a container for all model binders for the application, listed by binder type.

public ref class ModelBinderDictionary : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<Type ^, System::Web::ModelBinding::IModelBinder ^>>, System::Collections::Generic::IDictionary<Type ^, System::Web::ModelBinding::IModelBinder ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<Type ^, System::Web::ModelBinding::IModelBinder ^>>
public class ModelBinderDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Type,System.Web.ModelBinding.IModelBinder>>, System.Collections.Generic.IDictionary<Type,System.Web.ModelBinding.IModelBinder>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Type,System.Web.ModelBinding.IModelBinder>>
type ModelBinderDictionary = class
    interface IDictionary<Type, IModelBinder>
    interface ICollection<KeyValuePair<Type, IModelBinder>>
    interface seq<KeyValuePair<Type, IModelBinder>>
    interface IEnumerable
Public Class ModelBinderDictionary
Implements ICollection(Of KeyValuePair(Of Type, IModelBinder)), IDictionary(Of Type, IModelBinder), IEnumerable(Of KeyValuePair(Of Type, IModelBinder))
继承
ModelBinderDictionary
实现

构造函数

ModelBinderDictionary()

初始化 ModelBinderDictionary 类的新实例。Initializes a new instance of the ModelBinderDictionary class.

属性

Count

获取字典中项的数目。Gets the number of items in the dictionary.

DefaultBinder

获取或设置默认的模型联编程序。Gets or sets the default model binder.

IsReadOnly

获取一个值,该值指示字典是否为只读。Gets a value that indicates whether the dictionary is read-only.

Item[Type]

获取或设置实现 IModelBinder 接口的对象中的指定键。Gets or sets the specified key in an object that implements the IModelBinder interface.

Keys

获取一个集合,它包含字典中的键。Gets a collection that contains the keys in the dictionary.

Values

获取包含模型联编程序字典中的值的集合。Gets a collection that contains the values in the model binder dictionary.

方法

Add(KeyValuePair<Type,IModelBinder>)

将指定项添加到字典。Adds the specified item to the dictionary.

Add(Type, IModelBinder)

将指定项添加到字典。Adds the specified item to the dictionary.

Clear()

从字典中移除所有项。Removes all items from the dictionary.

Contains(KeyValuePair<Type,IModelBinder>)

确定模型联编程序字典是否包含指定的值。Determines whether the model binder dictionary contains a specified value.

ContainsKey(Type)

确定模型联编程序字典是否包含具有指定的键的元素。Determines whether the model binder dictionary contains an element that has the specified key.

CopyTo(KeyValuePair<Type,IModelBinder>[], Int32)

从指定的索引位置开始,将模型联编程序字典中的元素复制到一个数组中。Copies the elements of the model binder dictionary to an array, starting at a specified index.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回一个可用于循环访问集合的枚举数。Returns an enumerator that can be used to iterate through the collection.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Remove(KeyValuePair<Type,IModelBinder>)

从模型联编程序字典中移除指定元素的第一个匹配项。Removes the first occurrence of the specified element from the model binder dictionary.

Remove(Type)

从模型联编程序字典中移除具有指定键的元素。Removes the element that has the specified key from the model binder dictionary.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
TryGetValue(Type, IModelBinder)

获取与指定的键关联的值。Gets the value that is associated with the specified key.

显式界面实现

IEnumerable.GetEnumerator()

返回一个可用于循环访问集合的枚举器。Returns an enumerator that can be used to iterate through a collection.

扩展方法

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于