Share via


ArrayModelBinder<TElement>.CreateOrReplaceCollection Method

Converts the collection to an array.

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 TElement) _
) As Boolean
'Usage
Dim actionContext As HttpActionContext
Dim bindingContext As ModelBindingContext
Dim newCollection As IList(Of TElement)
Dim returnValue As Boolean

returnValue = Me.CreateOrReplaceCollection(actionContext, _
    bindingContext, newCollection)
protected override bool CreateOrReplaceCollection(
    HttpActionContext actionContext,
    ModelBindingContext bindingContext,
    IList<TElement> newCollection
)
protected:
virtual bool CreateOrReplaceCollection(
    HttpActionContext^ actionContext, 
    ModelBindingContext^ bindingContext, 
    IList<TElement>^ newCollection
) override
abstract CreateOrReplaceCollection : 
        actionContext:HttpActionContext * 
        bindingContext:ModelBindingContext * 
        newCollection:IList<'TElement> -> bool 
override CreateOrReplaceCollection : 
        actionContext:HttpActionContext * 
        bindingContext:ModelBindingContext * 
        newCollection:IList<'TElement> -> bool 
protected override function CreateOrReplaceCollection(
    actionContext : HttpActionContext, 
    bindingContext : ModelBindingContext, 
    newCollection : IList<TElement>
) : boolean

Parameters

Return Value

Type: System.Boolean
true in all cases.

See Also

Reference

ArrayModelBinder<TElement> Class

System.Web.Http.ModelBinding.Binders Namespace