DictionaryModelBinder<TKey, TValue>.CreateOrReplaceCollection Method
Converts the collection to a dictionary.
Namespace: System.Web.Http.ModelBinding.Binders
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Protected Overrides Function CreateOrReplaceCollection ( _
actionContext As HttpActionContext, _
bindingContext As ModelBindingContext, _
newCollection As IList(Of KeyValuePair(Of TKey, TValue)) _
) As Boolean
'Usage
Dim actionContext As HttpActionContext
Dim bindingContext As ModelBindingContext
Dim newCollection As IList(Of KeyValuePair(Of TKey, TValue))
Dim returnValue As Boolean
returnValue = Me.CreateOrReplaceCollection(actionContext, _
bindingContext, newCollection)
protected override bool CreateOrReplaceCollection(
HttpActionContext actionContext,
ModelBindingContext bindingContext,
IList<KeyValuePair<TKey, TValue>> newCollection
)
protected:
virtual bool CreateOrReplaceCollection(
HttpActionContext^ actionContext,
ModelBindingContext^ bindingContext,
IList<KeyValuePair<TKey, TValue>>^ newCollection
) override
abstract CreateOrReplaceCollection :
actionContext:HttpActionContext *
bindingContext:ModelBindingContext *
newCollection:IList<KeyValuePair<'TKey, 'TValue>> -> bool
override CreateOrReplaceCollection :
actionContext:HttpActionContext *
bindingContext:ModelBindingContext *
newCollection:IList<KeyValuePair<'TKey, 'TValue>> -> bool
protected override function CreateOrReplaceCollection(
actionContext : HttpActionContext,
bindingContext : ModelBindingContext,
newCollection : IList<KeyValuePair<TKey, TValue>>
) : boolean
Parameters
- actionContext
Type: System.Web.Http.Controllers.HttpActionContext
The action context.
- bindingContext
Type: System.Web.Http.ModelBinding.ModelBindingContext
The binding context.
- newCollection
Type: System.Collections.Generic.IList<KeyValuePair<TKey, TValue>>
The new collection.
Return Value
Type: System.Boolean
true in all cases.