- Timestamp:
- 03/14/10 00:42:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs
r3007 r3016 51 51 private readonly List<Exception> exceptions; 52 52 53 /// <summary> 54 /// Gets or sets a value indicating whether to interleave type information 55 /// while serializing an object. 56 /// 57 /// Alternatively the type information can be obtained through the 58 /// <see cref="TypeCache"/> Property after serialization is done. 59 /// </summary> 60 /// <value> 61 /// <c>true</c> if type information should be interleaved; otherwise, <c>false</c>. 62 /// </value> 53 63 public bool InterleaveTypeInformation { get; set; } 54 64 … … 56 66 /// Contains a mapping of type id to type and serializer. 57 67 /// </summary> 68 /// <value>The type cache.</value> 58 69 public List<TypeMapping> TypeCache { 59 70 get { … … 99 110 requiredFiles = new List<string>(files.Keys); 100 111 } 101 112 113 /// <summary> 114 /// Initializes a new instance of the <see cref="Serializer"/> class. 115 /// </summary> 116 /// <param name="obj">The object to serialize.</param> 117 /// <param name="configuration">The configuration.</param> 102 118 public Serializer(object obj, Configuration configuration) : 103 119 this(obj, configuration, "ROOT") { } 104 120 121 /// <summary> 122 /// Initializes a new instance of the <see cref="Serializer"/> class. 123 /// </summary> 124 /// <param name="obj">The object to serialize.</param> 125 /// <param name="configuration">The configuration.</param> 126 /// <param name="rootName">Name of the root token.</param> 105 127 public Serializer(object obj, Configuration configuration, string rootName) 106 128 : this(obj, configuration, rootName, false) { } 107 129 130 /// <summary> 131 /// Initializes a new instance of the <see cref="Serializer"/> class. 132 /// </summary> 133 /// <param name="obj">The object to serialize.</param> 134 /// <param name="configuration">The configuration.</param> 135 /// <param name="rootName">Name of the root token.</param> 108 136 /// <param name="isTestRun">Try to complete the whole object graph, 109 137 /// don't stop at the first exception</param> … … 119 147 } 120 148 149 /// <summary> 150 /// Returns an enumerator that iterates through a collection. 151 /// </summary> 152 /// <returns> 153 /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to 154 /// iterate through the collection. 155 /// </returns> 121 156 IEnumerator IEnumerable.GetEnumerator() { 122 157 return GetEnumerator(); 123 158 } 124 159 160 /// <summary> 161 /// Returns an enumerator that iterates through the serialization tokens. 162 /// </summary> 163 /// <returns> 164 /// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to 165 /// iterate through serialization tokens. 166 /// </returns> 125 167 public IEnumerator<ISerializationToken> GetEnumerator() { 126 168 var enumerator = Serialize(new DataMemberAccessor(rootName, null, () => obj, null)); … … 267 309 yield return new EndToken(name, typeId, id); 268 310 } 269 270 311 } 271 272 273 312 }
Note: See TracChangeset
for help on using the changeset viewer.