1<?xml version="1.0" encoding="utf-8"?> 2<Type Name="CollectionCodeDomSerializer" FullName="System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer"> 3 <TypeSignature Language="C#" Value="public class CollectionCodeDomSerializer : System.ComponentModel.Design.Serialization.CodeDomSerializer" /> 4 <AssemblyInfo> 5 <AssemblyName>System.Design</AssemblyName> 6 <AssemblyVersion>2.0.0.0</AssemblyVersion> 7 </AssemblyInfo> 8 <Base> 9 <BaseTypeName>System.ComponentModel.Design.Serialization.CodeDomSerializer</BaseTypeName> 10 </Base> 11 <Interfaces /> 12 <Docs> 13 <remarks> 14 <attribution license="cc4" from="Microsoft" modified="false" /> 15 <para>The <see cref="T:System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer" /> class can create either statements or expressions. If the object to serialize is an array, the <see cref="T:System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer" /> will create an expression and assign it to the statement in the current context stack. If the object is a collection with an AddRange or similar method, the <see cref="T:System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer" /> will create a statement that calls the method.</para> 16 </remarks> 17 <summary> 18 <attribution license="cc4" from="Microsoft" modified="false" /> 19 <para>Serializes collections.</para> 20 </summary> 21 </Docs> 22 <Members> 23 <Member MemberName=".ctor"> 24 <MemberSignature Language="C#" Value="public CollectionCodeDomSerializer ();" /> 25 <MemberType>Constructor</MemberType> 26 <AssemblyInfo> 27 <AssemblyVersion>2.0.0.0</AssemblyVersion> 28 </AssemblyInfo> 29 <Parameters /> 30 <Docs> 31 <remarks>To be added.</remarks> 32 <summary> 33 <attribution license="cc4" from="Microsoft" modified="false" /> 34 <para>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer" /> class. </para> 35 </summary> 36 </Docs> 37 </Member> 38 <Member MemberName="MethodSupportsSerialization"> 39 <MemberSignature Language="C#" Value="protected bool MethodSupportsSerialization (System.Reflection.MethodInfo method);" /> 40 <MemberType>Method</MemberType> 41 <AssemblyInfo> 42 <AssemblyVersion>2.0.0.0</AssemblyVersion> 43 </AssemblyInfo> 44 <ReturnValue> 45 <ReturnType>System.Boolean</ReturnType> 46 </ReturnValue> 47 <Parameters> 48 <Parameter Name="method" Type="System.Reflection.MethodInfo" /> 49 </Parameters> 50 <Docs> 51 <remarks> 52 <attribution license="cc4" from="Microsoft" modified="false" /> 53 <para>Checks the <paramref name="method" /> attributes to see if they support serialization.</para> 54 </remarks> 55 <summary> 56 <attribution license="cc4" from="Microsoft" modified="false" /> 57 <para>Verifies serialization support by the <paramref name="method" />.</para> 58 </summary> 59 <returns> 60 <attribution license="cc4" from="Microsoft" modified="false" /> 61 <para>true if the <paramref name="method" /> supports serialization; otherwise, false.</para> 62 </returns> 63 <param name="method"> 64 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Reflection.MethodInfo" /> to check for serialization attributes.</param> 65 </Docs> 66 </Member> 67 <Member MemberName="Serialize"> 68 <MemberSignature Language="C#" Value="public override object Serialize (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);" /> 69 <MemberType>Method</MemberType> 70 <AssemblyInfo> 71 <AssemblyVersion>2.0.0.0</AssemblyVersion> 72 </AssemblyInfo> 73 <ReturnValue> 74 <ReturnType>System.Object</ReturnType> 75 </ReturnValue> 76 <Parameters> 77 <Parameter Name="manager" Type="System.ComponentModel.Design.Serialization.IDesignerSerializationManager" /> 78 <Parameter Name="value" Type="System.Object" /> 79 </Parameters> 80 <Docs> 81 <remarks> 82 <attribution license="cc4" from="Microsoft" modified="false" /> 83 <para>Collections are serialized as follows:</para> 84 <list type="ordered"> 85 <item> 86 <para>If the collection is an array, the array is written.</para> 87 <list type="ordered"> 88 <item> 89 <para>If the collection has an AddRange method, it will be called and provided with an array.</para> 90 </item> 91 <item> 92 <para>If the collection has an Add method, it will be called repeatedly until all items in the collection are written.</para> 93 </item> 94 </list> 95 </item> 96 <item> 97 <para>If the collection is an <see cref="T:System.Collections.IList" />, the <see cref="M:System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer.Serialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)" /> method will cast the collection to an <see cref="T:System.Collections.IList" /> and add through that interface.</para> 98 <list type="ordered"> 99 <item> 100 <para>If the collection has no Add method, but is marked with <see cref="F:System.ComponentModel.DesignerSerializationVisibility.Content" />, <see cref="M:System.ComponentModel.Design.Serialization.CollectionCodeDomSerializer.Serialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)" /> will enumerate the collection and serialize each element.</para> 101 </item> 102 </list> 103 </item> 104 </list> 105 </remarks> 106 <summary> 107 <attribution license="cc4" from="Microsoft" modified="false" /> 108 <para>Serializes the given collection into a CodeDOM object.</para> 109 </summary> 110 <returns> 111 <attribution license="cc4" from="Microsoft" modified="false" /> 112 <para>A CodeDOM object representing <paramref name="value" />.</para> 113 </returns> 114 <param name="manager"> 115 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.ComponentModel.Design.Serialization.IDesignerSerializationManager" /> to use during serialization.</param> 116 <param name="value"> 117 <attribution license="cc4" from="Microsoft" modified="false" />The object to serialize.</param> 118 </Docs> 119 </Member> 120 <Member MemberName="SerializeCollection"> 121 <MemberSignature Language="C#" Value="protected virtual object SerializeCollection (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, System.CodeDom.CodeExpression targetExpression, Type targetType, System.Collections.ICollection originalCollection, System.Collections.ICollection valuesToSerialize);" /> 122 <MemberType>Method</MemberType> 123 <AssemblyInfo> 124 <AssemblyVersion>2.0.0.0</AssemblyVersion> 125 </AssemblyInfo> 126 <ReturnValue> 127 <ReturnType>System.Object</ReturnType> 128 </ReturnValue> 129 <Parameters> 130 <Parameter Name="manager" Type="System.ComponentModel.Design.Serialization.IDesignerSerializationManager" /> 131 <Parameter Name="targetExpression" Type="System.CodeDom.CodeExpression" /> 132 <Parameter Name="targetType" Type="System.Type" /> 133 <Parameter Name="originalCollection" Type="System.Collections.ICollection" /> 134 <Parameter Name="valuesToSerialize" Type="System.Collections.ICollection" /> 135 </Parameters> 136 <Docs> 137 <remarks> 138 <attribution license="cc4" from="Microsoft" modified="false" /> 139 <para>The <see cref="T:System.CodeDom.CodeExpression" /> that refers to the collection can be null.</para> 140 </remarks> 141 <summary> 142 <attribution license="cc4" from="Microsoft" modified="false" /> 143 <para>Serializes the given collection.</para> 144 </summary> 145 <returns> 146 <attribution license="cc4" from="Microsoft" modified="false" /> 147 <para>Serialized collection if the serialization process succeeded; otherwise, null.</para> 148 </returns> 149 <param name="manager"> 150 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.ComponentModel.Design.Serialization.IDesignerSerializationManager" /> to use during serialization.</param> 151 <param name="targetExpression"> 152 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.CodeDom.CodeExpression" /> that refers to the collection</param> 153 <param name="targetType"> 154 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Type" /> of the collection.</param> 155 <param name="originalCollection"> 156 <attribution license="cc4" from="Microsoft" modified="false" />The collection to serialize.</param> 157 <param name="valuesToSerialize"> 158 <attribution license="cc4" from="Microsoft" modified="false" />The values to serialize.</param> 159 </Docs> 160 </Member> 161 </Members> 162</Type>