CollectionModelBinder<TElement>.CreateOrReplaceCollection 方法

定义

为派生类提供一种方法,用于在从绑定器返回集合之前对其进行操作。

protected:
 virtual bool CreateOrReplaceCollection(System::Web::ModelBinding::ModelBindingExecutionContext ^ modelBindingExecutionContext, System::Web::ModelBinding::ModelBindingContext ^ bindingContext, System::Collections::Generic::IList<TElement> ^ newCollection);
protected virtual bool CreateOrReplaceCollection(System.Web.ModelBinding.ModelBindingExecutionContext modelBindingExecutionContext, System.Web.ModelBinding.ModelBindingContext bindingContext, System.Collections.Generic.IList<TElement> newCollection);
abstract member CreateOrReplaceCollection : System.Web.ModelBinding.ModelBindingExecutionContext * System.Web.ModelBinding.ModelBindingContext * System.Collections.Generic.IList<'Element> -> bool
override this.CreateOrReplaceCollection : System.Web.ModelBinding.ModelBindingExecutionContext * System.Web.ModelBinding.ModelBindingContext * System.Collections.Generic.IList<'Element> -> bool
Protected Overridable Function CreateOrReplaceCollection (modelBindingExecutionContext As ModelBindingExecutionContext, bindingContext As ModelBindingContext, newCollection As IList(Of TElement)) As Boolean

参数

modelBindingExecutionContext
ModelBindingExecutionContext

执行上下文。

bindingContext
ModelBindingContext

绑定上下文。

newCollection
IList<TElement>

新集合。

返回

true 在所有情况下。

适用于