CollectionModelBinder<TElement>.ConvertToCollectionType Method

Definition

Gets an Object assignable to targetType that contains members from collection.

protected:
 virtual System::Object ^ ConvertToCollectionType(Type ^ targetType, System::Collections::Generic::IEnumerable<TElement> ^ collection);
protected virtual object ConvertToCollectionType (Type targetType, System.Collections.Generic.IEnumerable<TElement> collection);
protected virtual object? ConvertToCollectionType (Type targetType, System.Collections.Generic.IEnumerable<TElement?> collection);
abstract member ConvertToCollectionType : Type * seq<'Element> -> obj
override this.ConvertToCollectionType : Type * seq<'Element> -> obj
Protected Overridable Function ConvertToCollectionType (targetType As Type, collection As IEnumerable(Of TElement)) As Object

Parameters

targetType
Type

Type of the model.

collection
IEnumerable<TElement>

Collection of values retrieved from value providers. null if nothing was bound.

Returns

An Object assignable to targetType. null if nothing was bound.

Remarks

Extensibility point that allows the bound collection to be manipulated or transformed before being returned from the binder.

Applies to