次の方法で共有


CollectionModelBinder<TElement>.ConvertToCollectionType メソッド

定義

からcollectionメンバーをObject含む にtargetType割り当て可能な を取得します。

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

パラメーター

targetType
Type

Type モデルの。

collection
IEnumerable<TElement>

値プロバイダーから取得された値のコレクション。 null 何もバインドされなかった場合は 。

戻り値

ObjecttargetType割り当て可能な 。 null 何もバインドされなかった場合は 。

注釈

バインドされたコレクションをバインダーから返す前に操作または変換できるようにする拡張ポイント。

適用対象