CollectionModelBinder<TElement>.CreateOrReplaceCollection Method (ControllerContext, ExtensibleModelBindingContext, IList<TElement>)
Provides a way for derived classes to manipulate the collection before returning it from the binder.
Namespace: Microsoft.Web.Mvc.ModelBinding
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
protected virtual bool CreateOrReplaceCollection(
ControllerContext controllerContext,
ExtensibleModelBindingContext bindingContext,
IList<TElement> newCollection
)
protected:
virtual bool CreateOrReplaceCollection(
ControllerContext^ controllerContext,
ExtensibleModelBindingContext^ bindingContext,
IList<TElement>^ newCollection
)
abstract CreateOrReplaceCollection :
controllerContext:ControllerContext *
bindingContext:ExtensibleModelBindingContext *
newCollection:IList<'TElement> -> bool
override CreateOrReplaceCollection :
controllerContext:ControllerContext *
bindingContext:ExtensibleModelBindingContext *
newCollection:IList<'TElement> -> bool
Protected Overridable Function CreateOrReplaceCollection (
controllerContext As ControllerContext,
bindingContext As ExtensibleModelBindingContext,
newCollection As IList(Of TElement)
) As Boolean
Parameters
controllerContext
Type: System.Web.Mvc.ControllerContextThe controller context.
bindingContext
Type: Microsoft.Web.Mvc.ModelBinding.ExtensibleModelBindingContextThe binding context.
newCollection
Type: System.Collections.Generic.IList<TElement>The new collection.
Return Value
Type: System.Boolean
true in all cases.
See Also
CollectionModelBinder<TElement> Class
Microsoft.Web.Mvc.ModelBinding Namespace
Return to top