ModelBinderDictionary ModelBinderDictionary ModelBinderDictionary ModelBinderDictionary Class

定義

提供應用程式之所有模型繫結器 (依繫結器型別列出) 的容器。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))
繼承
ModelBinderDictionaryModelBinderDictionaryModelBinderDictionaryModelBinderDictionary
實作

建構函式

ModelBinderDictionary() ModelBinderDictionary() ModelBinderDictionary() ModelBinderDictionary()

初始化 ModelBinderDictionary 類別的新執行個體。Initializes a new instance of the ModelBinderDictionary class.

屬性

Count Count Count Count

取得字典中的項目數目。Gets the number of items in the dictionary.

DefaultBinder DefaultBinder DefaultBinder DefaultBinder

取得或設定預設模型繫結器。Gets or sets the default model binder.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,這個值表示字典是否為唯讀。Gets a value that indicates whether the dictionary is read-only.

Item[Type] Item[Type] Item[Type] Item[Type]

取得或設定實作 IModelBinder 介面之物件中指定的索引鍵。Gets or sets the specified key in an object that implements the IModelBinder interface.

Keys Keys Keys Keys

取得集合,其中包含字典中的索引鍵。Gets a collection that contains the keys in the dictionary.

Values Values Values Values

取得包含模型繫結器字典中的值之集合。Gets a collection that contains the values in the model binder dictionary.

方法

Add(KeyValuePair<Type,IModelBinder>) Add(KeyValuePair<Type,IModelBinder>) Add(KeyValuePair<Type,IModelBinder>) Add(KeyValuePair<Type,IModelBinder>)

將指定的項目加入至字典。Adds the specified item to the dictionary.

Add(Type, IModelBinder) Add(Type, IModelBinder) Add(Type, IModelBinder) Add(Type, IModelBinder)

將指定的項目加入至字典。Adds the specified item to the dictionary.

Clear() Clear() Clear() Clear()

移除字典中的所有項目。Removes all items from the dictionary.

Contains(KeyValuePair<Type,IModelBinder>) Contains(KeyValuePair<Type,IModelBinder>) Contains(KeyValuePair<Type,IModelBinder>) Contains(KeyValuePair<Type,IModelBinder>)

判斷模型繫結器字典是否包含指定的值。Determines whether the model binder dictionary contains a specified value.

ContainsKey(Type) ContainsKey(Type) ContainsKey(Type) ContainsKey(Type)

判斷模型繫結器字典是否包含具有指定之索引鍵的項目。Determines whether the model binder dictionary contains an element that has the specified key.

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

從指定的索引開始,將模型繫結器字典的項目複製到陣列。Copies the elements of the model binder dictionary to an array, starting at a specified index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回列舉值,可用來逐一查看集合。Returns an enumerator that can be used to iterate through the collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(KeyValuePair<Type,IModelBinder>) Remove(KeyValuePair<Type,IModelBinder>) Remove(KeyValuePair<Type,IModelBinder>) Remove(KeyValuePair<Type,IModelBinder>)

從模型繫結器字典中移除第一次出現的指定項目。Removes the first occurrence of the specified element from the model binder dictionary.

Remove(Type) Remove(Type) Remove(Type) Remove(Type)

從模型繫結器字典移除具有指定之索引鍵的項目。Removes the element that has the specified key from the model binder dictionary.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryGetValue(Type, IModelBinder) TryGetValue(Type, IModelBinder) TryGetValue(Type, IModelBinder) TryGetValue(Type, IModelBinder)

取得與指定之索引鍵相關聯的值。Gets the value that is associated with the specified key.

明確介面實作

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

傳回可用於逐一查看集合的列舉程式。Returns an enumerator that can be used to iterate through a collection.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

傳回DataTable,其中包含副本DataRow物件,指定輸入IEnumerable<T>物件其中泛型參數TDataRowReturns 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

複本DataRow至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

複本DataRow至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) 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>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) 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>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於