Share via


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

Return Value

Type: System.Boolean
true in all cases.

See Also

Reference

DictionaryModelBinder<TKey, TValue> Class

System.Web.Http.ModelBinding.Binders Namespace