Udostępnij przez


CollectionModelBinder<TElement>.ConvertToCollectionType Metoda

Definicja

Pobiera element Object przypisany do targetType elementu zawierającego elementy członkowskie z elementu 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>

Kolekcja wartości pobranych od dostawców wartości. null jeśli nic nie było powiązane.

Zwraca

Element Object możliwy do przypisania do elementu targetType. null jeśli nic nie było powiązane.

Uwagi

Punkt rozszerzalności, który umożliwia manipulowanie lub przekształcanie powiązanej kolekcji przed zwróceniem z elementu binder.

Dotyczy