CollectionCodeDomSerializer.SerializeCollection 方法

定义

序列化给定集合。

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引用集合的 。

targetType
Type

集合的 Type

originalCollection
ICollection

要序列化的集合。

valuesToSerialize
ICollection

要序列化的值。

返回

如果序列化过程成功,则为已序列化的集合;否则为 null

例外

managertargetTypeoriginalCollectionvaluesToSerializenull

注解

CodeExpression引用集合的 可以是 null

适用于

另请参阅