CollectionModelBinder<TElement>.ConvertToCollectionType Metoda

Definice

Object Získá přiřaditelné k targetType tomu, který obsahuje členy z 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

Parametry

targetType
Type

Type modelu.

collection
IEnumerable<TElement>

Kolekce hodnot načtených z poskytovatelů hodnot null pokud nic nebylo vázáno.

Návraty

Object

Přiřaditelné Object k targetType. null pokud nic nebylo vázáno.

Poznámky

Bod rozšiřitelnosti, který umožňuje manipulaci s vázanou kolekcí nebo transformaci před vrácením ze binderu.

Platí pro