DictionaryModelBinder<TKey,TValue>.CreateOrReplaceCollection(ModelBindingExecutionContext, ModelBindingContext, IList<KeyValuePair<TKey,TValue>>) 方法
定义
将集合转换为字典。Converts the collection to a dictionary.
protected:
override bool CreateOrReplaceCollection(System::Web::ModelBinding::ModelBindingExecutionContext ^ modelBindingExecutionContext, System::Web::ModelBinding::ModelBindingContext ^ bindingContext, System::Collections::Generic::IList<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ newCollection);
protected override bool CreateOrReplaceCollection (System.Web.ModelBinding.ModelBindingExecutionContext modelBindingExecutionContext, System.Web.ModelBinding.ModelBindingContext bindingContext, System.Collections.Generic.IList<System.Collections.Generic.KeyValuePair<TKey,TValue>> newCollection);
override this.CreateOrReplaceCollection : System.Web.ModelBinding.ModelBindingExecutionContext * System.Web.ModelBinding.ModelBindingContext * System.Collections.Generic.IList<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> bool
Protected Overrides Function CreateOrReplaceCollection (modelBindingExecutionContext As ModelBindingExecutionContext, bindingContext As ModelBindingContext, newCollection As IList(Of KeyValuePair(Of TKey, TValue))) As Boolean
参数
- modelBindingExecutionContext
- ModelBindingExecutionContext
该执行上下文。The execution context.
- bindingContext
- ModelBindingContext
绑定上下文。The binding context.
- newCollection
- IList<KeyValuePair<TKey,TValue>>
新集合。The new collection.
返回
在所有情况下均为 true。true in all cases.