CollectionModelBinder<TElement>.ConvertToCollectionType 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
Object取得可指派的 , targetType
其中包含 的成員。 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
參數
- collection
- IEnumerable<TElement>
從值提供者擷取的值集合。
null
如果未系結任何內容,則為 。
傳回
Object可指派給 targetType
。
null
如果未系結任何內容,則為 。
備註
擴充點,允許在從系結器傳回之前,先操作或轉換系結集合。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應