CollectionCodeDomSerializer.SerializeCollection 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的集合序列化。
protected:
virtual System::Object ^ SerializeCollection(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::CodeDom::CodeExpression ^ targetExpression, Type ^ targetType, System::Collections::ICollection ^ originalCollection, System::Collections::ICollection ^ valuesToSerialize);
protected virtual object SerializeCollection (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, System.CodeDom.CodeExpression targetExpression, Type targetType, System.Collections.ICollection originalCollection, System.Collections.ICollection valuesToSerialize);
protected virtual object? SerializeCollection (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, System.CodeDom.CodeExpression? targetExpression, Type targetType, System.Collections.ICollection originalCollection, System.Collections.ICollection valuesToSerialize);
abstract member SerializeCollection : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * System.CodeDom.CodeExpression * Type * System.Collections.ICollection * System.Collections.ICollection -> obj
override this.SerializeCollection : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * System.CodeDom.CodeExpression * Type * System.Collections.ICollection * System.Collections.ICollection -> obj
Protected Overridable Function SerializeCollection (manager As IDesignerSerializationManager, targetExpression As CodeExpression, targetType As Type, originalCollection As ICollection, valuesToSerialize As ICollection) As Object
參數
- manager
- IDesignerSerializationManager
供序列化期間使用的 IDesignerSerializationManager。
- targetExpression
- CodeExpression
CodeExpression參考集合的 。
- originalCollection
- ICollection
要序列化的集合。
- valuesToSerialize
- ICollection
要序列化的值。
傳回
如果序列化程序成功,則將集合序列化;否則為 null
。
例外狀況
manager
、targetType
、originalCollection
或 valuesToSerialize
為 null
。
備註
CodeExpression參考集合的 可以是 null
。