Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3036


Ignore:
Timestamp:
03/15/10 14:45:46 (14 years ago)
Author:
epitzer
Message:

make most serializers internal and complete API documentation (#548)

Location:
trunk/sources/HeuristicLab.Persistence/3.3
Files:
71 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs

    r3004 r3036  
    2020          "Cannot load type \"{0}\", falling back to partial name", typeNameString));
    2121        try {
    22           TypeName typeName = TypeNameParser.Parse(typeNameString);
    23           Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName);
     22          TypeName typeName = TypeNameParser.Parse(typeNameString);             
     23#pragma warning disable 0618
     24          Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName);         
     25          // the suggested Assembly.Load() method fails to load assemblies outside the GAC
     26#pragma warning restore 0618
    2427          type = a.GetType(typeName.ToString(false, false), true);
    2528        } catch (Exception) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs

    r3017 r3036  
    3636    [Storable]
    3737    public List<TypeName> GenericArgs { get; internal set; }
     38
     39    /// <summary>
     40    /// Gets a value indicating whether this instance is generic.
     41    /// </summary>
     42    /// <value>
     43    ///   <c>true</c> if this instance is generic; otherwise, <c>false</c>.
     44    /// </value>
    3845    public bool IsGeneric { get { return GenericArgs.Count > 0; } }
    3946
     
    8794    /// Returns a <see cref="System.String"/> that represents this instance.
    8895    /// </summary>
    89     /// <param name="full">if set to <c>true</c> includes full informatoin
     96    /// <param name="full">if set to <c>true</c> includes full information
    9097    /// about generic parameters and assembly properties.</param>
    9198    /// <returns>
     
    100107    /// Returns a <see cref="System.String"/> that represents this instance.
    101108    /// </summary>
     109    /// <param name="full">if set to <c>true</c> includes full information
     110    /// about generic parameters and assembly properties.</param>
    102111    /// <param name="includeAssembly">if set to <c>true</c> include assembly properties and generic parameters.</param>
    103112    /// <returns>
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/FormatBase.cs

    r3017 r3036  
    66  /// <summary>
    77  /// Common base class for defining a new serialization format.
    8   /// </summary> 
     8  /// </summary>
     9  /// <typeparam name="SerialDataFormat">The type of the serial data format.</typeparam>
    910  [StorableClass]
    1011  public abstract class FormatBase<SerialDataFormat> : IFormat<SerialDataFormat> where SerialDataFormat : ISerialData {
     
    2324    /// <summary>
    2425    /// Compares formats by name.
    25     /// </summary>   
     26    /// </summary>
     27    /// <param name="f">The format.</param>
     28    /// <returns>wheter this object and f are equal by name.</returns>
    2629    public bool Equals(FormatBase<SerialDataFormat> f) {
    2730      if (f == null)
     
    3336    /// Compares foramts by name.
    3437    /// </summary>
     38    /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
     39    /// <returns>
     40    ///   <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.
     41    /// </returns>
     42    /// <exception cref="T:System.NullReferenceException">
     43    /// The <paramref name="obj"/> parameter is null.
     44    /// </exception>
    3545    public override bool Equals(object obj) {
    3646      FormatBase<SerialDataFormat> f = obj as FormatBase<SerialDataFormat>;
     
    3848    }
    3949
     50    /// <summary>
     51    /// Returns a hash code for this instance.
     52    /// </summary>
     53    /// <returns>
     54    /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
     55    /// </returns>
    4056    public override int GetHashCode() {
    4157      return Name.GetHashCode();
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/PrimitiveSerializerBase.cs

    r3017 r3036  
    2626    /// Parses the specified serialized data back into an object.
    2727    /// </summary>
    28     /// <param name="t">The serial data.</param>
    29     /// <returns>A newly created object representing the serialized data.</returns>
     28    /// <param name="data">The serial data.</param>
     29    /// <returns>
     30    /// A newly created object representing the serialized data.
     31    /// </returns>
    3032    public abstract Source Parse(SerialData data);
    3133
     
    5456    /// Parses the specified serialized data back into an object.
    5557    /// </summary>
    56     /// <param name="t">The serial data.</param>
     58    /// <param name="data">The serial data.</param>
    5759    /// <returns>A newly created object representing the serialized data.</returns>
    58     object IPrimitiveSerializer.Parse(ISerialData o) {
    59       return Parse((SerialData)o);
     60    object IPrimitiveSerializer.Parse(ISerialData data) {
     61      return Parse((SerialData)data);
    6062    }
    6163
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs

    r3017 r3036  
    99
    1010  [StorableClass]
    11   public class ArraySerializer : ICompositeSerializer {
     11  internal sealed class ArraySerializer : ICompositeSerializer {
    1212
    1313    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs

    r3017 r3036  
    1111
    1212  [StorableClass]
    13   public class CompactNumberArray2StringSerializer : ICompositeSerializer {
     13  internal sealed class CompactNumberArray2StringSerializer : ICompositeSerializer {
    1414
    1515    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs

    r3017 r3036  
    1010
    1111  [StorableClass]
    12   public class DictionarySerializer : ICompositeSerializer {
     12  internal sealed class DictionarySerializer : ICompositeSerializer {
    1313
    1414    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs

    r3017 r3036  
    88
    99  [StorableClass]
    10   public class EnumSerializer : ICompositeSerializer {
     10  internal sealed class EnumSerializer : ICompositeSerializer {
    1111
    1212    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs

    r3017 r3036  
    1111
    1212  [StorableClass]
    13   public class EnumerableSerializer : ICompositeSerializer {
     13  internal sealed class EnumerableSerializer : ICompositeSerializer {
    1414
    1515    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs

    r3017 r3036  
    1010
    1111  [StorableClass]
    12   public class KeyValuePairSerializer : ICompositeSerializer {
     12  internal sealed class KeyValuePairSerializer : ICompositeSerializer {
    1313
    1414    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs

    r3017 r3036  
    1212namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1313
     14  /// <summary>
     15  /// Serializes a primitive number type using the ToString() method and an
     16  /// approriate precision and parses back the generated string using
     17  /// the number type's Parse() method.
     18  ///
     19  /// This serializer has Priorty below zero and is disabled by default
     20  /// but can be useful in generating custom serializers.
     21  /// </summary>
    1422  [StorableClass]
    15   public class Number2StringSerializer : ICompositeSerializer {
     23  public sealed class Number2StringSerializer : ICompositeSerializer {
    1624
    1725    private static readonly List<Type> numberTypes =
     
    4250    }
    4351
     52    /// <summary>
     53    /// Determines for every type whether the composite serializer is applicable.
     54    /// </summary>
     55    /// <param name="type">The type.</param>
     56    /// <returns>
     57    ///   <c>true</c> if this instance can serialize the specified type; otherwise, <c>false</c>.
     58    /// </returns>
    4459    public bool CanSerialize(Type type) {
    4560      return numberParsers.ContainsKey(type);
    4661    }
    4762
     63    /// <summary>
     64    /// Give a reason if possibly why the given type cannot be serialized by this
     65    /// ICompositeSerializer.
     66    /// </summary>
     67    /// <param name="type">The type.</param>
     68    /// <returns>
     69    /// A string justifying why type cannot be serialized.
     70    /// </returns>
    4871    public string JustifyRejection(Type type) {
    4972      return string.Format("not a number type (one of {0})",
     
    5174    }
    5275
     76    /// <summary>
     77    /// Formats the specified obj.
     78    /// </summary>
     79    /// <param name="obj">The obj.</param>
     80    /// <returns></returns>
    5381    public string Format(object obj) {
    5482      if (obj.GetType() == typeof(float))
     
    6189    }
    6290
     91    /// <summary>
     92    /// Parses the specified string value.
     93    /// </summary>
     94    /// <param name="stringValue">The string value.</param>
     95    /// <param name="type">The type.</param>
     96    /// <returns></returns>
    6397    public object Parse(string stringValue, Type type) {
    6498      try {
     
    75109
    76110
     111
     112    /// <summary>
     113    /// Defines the Priorty of this composite serializer. Higher number means
     114    /// higher prioriy. Negative numbers are fallback serializers that are
     115    /// disabled by default.
     116    /// All default generic composite serializers have priority 100. Specializations
     117    /// have priority 200 so they will  be tried first. Priorities are
     118    /// only considered for default configurations.
     119    /// </summary>
     120    /// <value></value>
    77121    public int Priority {
    78122      get { return -100; }
    79123    }
    80124
     125    /// <summary>
     126    /// Generate MetaInfo necessary for instance creation. (e.g. dimensions
     127    /// necessary for array creation.
     128    /// </summary>
     129    /// <param name="obj">An object.</param>
     130    /// <returns>An enumerable of <see cref="Tag"/>s.</returns>
    81131    public IEnumerable<Tag> CreateMetaInfo(object obj) {
    82132      yield return new Tag(Format(obj));
    83133    }
    84134
     135    /// <summary>
     136    /// Decompose an object into <see cref="Tag"/>s, the tag name can be null,
     137    /// the order in which elements are generated is guaranteed to be
     138    /// the same as they will be supplied to the Populate method.
     139    /// </summary>
     140    /// <param name="obj">An object.</param>
     141    /// <returns>An enumerable of <see cref="Tag"/>s.</returns>
    85142    public IEnumerable<Tag> Decompose(object obj) {
    86143      // numbers are composed just of meta info
     
    88145    }
    89146
     147    /// <summary>
     148    /// Create an instance of the object using the provided meta information.
     149    /// </summary>
     150    /// <param name="type">A type.</param>
     151    /// <param name="metaInfo">The meta information.</param>
     152    /// <returns>A fresh instance of the provided type.</returns>
    90153    public object CreateInstance(Type type, IEnumerable<Tag> metaInfo) {
    91154      var it = metaInfo.GetEnumerator();
     
    102165    }
    103166
     167    /// <summary>
     168    /// Fills an object with values from the previously generated <see cref="Tag"/>s
     169    /// in Decompose. The order in which the values are supplied is
     170    /// the same as they where generated. <see cref="Tag"/> names might be null.
     171    /// </summary>
     172    /// <param name="instance">An empty object instance.</param>
     173    /// <param name="tags">The tags.</param>
     174    /// <param name="type">The type.</param>
    104175    public void Populate(object instance, IEnumerable<Tag> tags, Type type) {
    105176      // numbers are composed just of meta info, no need to populate
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs

    r3017 r3036  
    1212
    1313  [StorableClass]
    14   public class NumberEnumerable2StringSerializer : ICompositeSerializer {
     14  internal sealed class NumberEnumerable2StringSerializer : ICompositeSerializer {
    1515
    1616    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs

    r3017 r3036  
    1111
    1212  [StorableClass]
    13   public class StackSerializer : ICompositeSerializer {
     13  internal sealed class StackSerializer : ICompositeSerializer {
    1414
    1515    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs

    r3031 r3036  
    1111  /// Indicates the time at which the hook should be invoked.
    1212  /// </summary>
    13   public enum HookType { BeforeSerialization, AfterDeserialization };
     13  public enum HookType {
     14
     15    /// <summary>
     16    /// States that this hook should be called before the storable
     17    /// serializer starts decomposing the object.
     18    /// </summary>
     19    BeforeSerialization,
     20   
     21    /// <summary>
     22    /// States that this hook should be called after the storable
     23    /// serializer hast complete re-assembled the object.
     24    /// </summary>
     25    AfterDeserialization };
    1426
    1527
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r3031 r3036  
    1818  /// </summary>
    1919  [StorableClass]
    20   public class StorableSerializer : ICompositeSerializer {
     20  public sealed class StorableSerializer : ICompositeSerializer {
    2121
    2222    #region ICompositeSerializer implementation
    2323
     24    /// <summary>
     25    /// Priority 200, one of the first default composite serializers to try.
     26    /// </summary>
     27    /// <value></value>
    2428    public int Priority {
    2529      get { return 200; }
    2630    }
    2731
     32    /// <summary>
     33    /// Determines for every type whether the composite serializer is applicable.
     34    /// </summary>
     35    /// <param name="type">The type.</param>
     36    /// <returns>
     37    ///   <c>true</c> if this instance can serialize the specified type; otherwise, <c>false</c>.
     38    /// </returns>
    2839    public bool CanSerialize(Type type) {
    2940      if (!ReflectionTools.HasDefaultConstructor(type) &&
     
    3344    }
    3445
     46    /// <summary>
     47    /// Give a reason if possibly why the given type cannot be serialized by this
     48    /// ICompositeSerializer.
     49    /// </summary>
     50    /// <param name="type">The type.</param>
     51    /// <returns>
     52    /// A string justifying why type cannot be serialized.
     53    /// </returns>
    3554    public string JustifyRejection(Type type) {
    3655      if (!ReflectionTools.HasDefaultConstructor(type) &&
     
    4261    }
    4362
     63    /// <summary>
     64    /// Creates the meta info.
     65    /// </summary>
     66    /// <param name="o">The object.</param>
     67    /// <returns>A list of storable components.</returns>
    4468    public IEnumerable<Tag> CreateMetaInfo(object o) {
    4569      InvokeHook(HookType.BeforeSerialization, o);
     
    4771    }
    4872
     73    /// <summary>
     74    /// Decompose an object into <see cref="Tag"/>s, the tag name can be null,
     75    /// the order in which elements are generated is guaranteed to be
     76    /// the same as they will be supplied to the Populate method.
     77    /// </summary>
     78    /// <param name="obj">An object.</param>
     79    /// <returns>An enumerable of <see cref="Tag"/>s.</returns>
    4980    public IEnumerable<Tag> Decompose(object obj) {
    5081      foreach (var accessor in GetStorableAccessors(obj)) {
     
    5586    private static readonly object[] defaultArgs = new object[] { true };
    5687
     88    /// <summary>
     89    /// Create an instance of the object using the provided meta information.
     90    /// </summary>
     91    /// <param name="type">A type.</param>
     92    /// <param name="metaInfo">The meta information.</param>
     93    /// <returns>A fresh instance of the provided type.</returns>
    5794    public object CreateInstance(Type type, IEnumerable<Tag> metaInfo) {
    5895      try {
     
    66103    }
    67104
     105    /// <summary>
     106    /// Populates the specified instance.
     107    /// </summary>
     108    /// <param name="instance">The instance.</param>
     109    /// <param name="objects">The objects.</param>
     110    /// <param name="type">The type.</param>
    68111    public void Populate(object instance, IEnumerable<Tag> objects, Type type) {
    69112      var memberDict = new Dictionary<string, Tag>();
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs

    r3017 r3036  
    1111
    1212  [StorableClass]
    13   public class StructSerializer : ICompositeSerializer {   
     13  internal sealed class StructSerializer : ICompositeSerializer {   
    1414
    1515    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs

    r3017 r3036  
    99
    1010  [StorableClass]
    11   public class TypeSerializer : ICompositeSerializer {
     11  internal sealed class TypeSerializer : ICompositeSerializer {
    1212
    1313    public int Priority {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs

    r3017 r3036  
    1010namespace HeuristicLab.Persistence.Default.DebugString {
    1111
     12  /// <summary>
     13  /// Simple write-only format for debugging purposes.
     14  /// </summary>
    1215  [StorableClass]
    1316  public class DebugStringFormat : FormatBase<DebugString> {
     17    /// <summary>
     18    /// Gets the format's name.
     19    /// </summary>
     20    /// <value>The format's name.</value>
    1421    public override string Name { get { return "DebugString"; } }
    1522  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringGenerator.cs

    r3005 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString {
    1010
     11  /// <summary>
     12  /// Generate a string that recursively describes an object graph.
     13  /// </summary>
    1114  public class DebugStringGenerator : GeneratorBase<string> {
    1215
     
    1417    private readonly bool showRefs;
    1518
     19    /// <summary>
     20    /// Initializes a new instance of the <see cref="DebugStringGenerator"/> class.
     21    /// </summary>
    1622    public DebugStringGenerator() : this(true) { }
    1723
     24    /// <summary>
     25    /// Initializes a new instance of the <see cref="DebugStringGenerator"/> class.
     26    /// </summary>
     27    /// <param name="showRefs">if set to <c>true</c> show references.</param>
    1828    public DebugStringGenerator(bool showRefs) {
    1929      isSepReq = false;
     
    2131    }
    2232
     33    /// <summary>
     34    /// Formats the specified begin token.
     35    /// </summary>
     36    /// <param name="beginToken">The begin token.</param>
     37    /// <returns>The token in serialized form.</returns>
    2338    protected override string Format(BeginToken beginToken) {
    2439      StringBuilder sb = new StringBuilder();
     
    3853    }
    3954
     55    /// <summary>
     56    /// Formats the specified end token.
     57    /// </summary>
     58    /// <param name="endToken">The end token.</param>
     59    /// <returns>The token in serialized form.</returns>
    4060    protected override string Format(EndToken endToken) {
    4161      isSepReq = true;
     
    4363    }
    4464
     65    /// <summary>
     66    /// Formats the specified primitive token.
     67    /// </summary>
     68    /// <param name="primitiveToken">The primitive token.</param>
     69    /// <returns>The token in serialized form.</returns>
    4570    protected override string Format(PrimitiveToken primitiveToken) {
    4671      StringBuilder sb = new StringBuilder();
     
    6186    }
    6287
     88    /// <summary>
     89    /// Formats the specified reference token.
     90    /// </summary>
     91    /// <param name="referenceToken">The reference token.</param>
     92    /// <returns>The token in serialized form.</returns>
    6393    protected override string Format(ReferenceToken referenceToken) {
    6494      StringBuilder sb = new StringBuilder();
     
    76106    }
    77107
     108    /// <summary>
     109    /// Formats the specified null reference token.
     110    /// </summary>
     111    /// <param name="nullReferenceToken">The null reference token.</param>
     112    /// <returns>The token in serialized form.</returns>
    78113    protected override string Format(NullReferenceToken nullReferenceToken) {
    79114      StringBuilder sb = new StringBuilder();
     
    89124    }
    90125
     126    /// <summary>
     127    /// Formats the specified meta info begin token.
     128    /// </summary>
     129    /// <param name="metaInfoBeginToken">The meta info begin token.</param>
     130    /// <returns>The token in serialized form.</returns>
    91131    protected override string Format(MetaInfoBeginToken metaInfoBeginToken) {
    92132      return "[";
    93133    }
    94134
     135    /// <summary>
     136    /// Formats the specified meta info end token.
     137    /// </summary>
     138    /// <param name="metaInfoEndToken">The meta info end token.</param>
     139    /// <returns>The token in serialized form.</returns>
    95140    protected override string Format(MetaInfoEndToken metaInfoEndToken) {
    96141      return "]";
    97142    }
    98143
     144    /// <summary>
     145    /// Formats the specified type token.
     146    /// </summary>
     147    /// <param name="typeToken">The type token.</param>
     148    /// <returns>The token in serialized form.</returns>
    99149    protected override string Format(TypeToken typeToken) {
    100150      return string.Empty;
    101151    }
    102152
     153    /// <summary>
     154    /// Serializes the specified object.
     155    /// </summary>
     156    /// <param name="o">The object.</param>
     157    /// <returns>A string representation of the complete object graph</returns>
    103158    public static string Serialize(object o) {
    104159      return Serialize(o, ConfigurationService.Instance.GetDefaultConfig(new DebugStringFormat()));
    105160    }
    106161
     162    /// <summary>
     163    /// Serializes the specified object.
     164    /// </summary>
     165    /// <param name="o">The object.</param>
     166    /// <param name="configuration">The persistence configuration.</param>
     167    /// <returns>A string representation of the complete object graph.</returns>
    107168    public static string Serialize(object o, Configuration configuration) {
    108169      Serializer s = new Serializer(o, configuration);
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Bool2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Bool2DebugStringSerializer : DebugStringSerializerBase<bool> { }
     11  internal sealed class Bool2DebugStringSerializer : DebugStringSerializerBase<bool> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Byte2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Byte2DebugStringSerializer : DebugStringSerializerBase<byte> { }
     11  internal sealed class Byte2DebugStringSerializer : DebugStringSerializerBase<byte> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Char2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Char2DebugStringSerializer : DebugStringSerializerBase<char> { }
     11  internal sealed class Char2DebugStringSerializer : DebugStringSerializerBase<char> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/DateTime2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class DateTime2DebugStringSerializer : DebugStringSerializerBase<DateTime> { }
     11  internal sealed class DateTime2DebugStringSerializer : DebugStringSerializerBase<DateTime> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Double2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Double2DebugStringSerializer : DebugStringSerializerBase<double> { }
     11  internal sealed class Double2DebugStringSerializer : DebugStringSerializerBase<double> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Float2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Float2DebugStringSerializer : DebugStringSerializerBase<float> { }
     11  internal sealed class Float2DebugStringSerializer : DebugStringSerializerBase<float> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Int2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Int2DebugStringSerializer : DebugStringSerializerBase<int> { }
     11  internal sealed class Int2DebugStringSerializer : DebugStringSerializerBase<int> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Long2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Long2DebugStringSerializer : DebugStringSerializerBase<long> { }
     11  internal sealed class Long2DebugStringSerializer : DebugStringSerializerBase<long> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/SByte2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class SByte2DebugStringSerializer : DebugStringSerializerBase<sbyte> { }
     11  internal sealed class SByte2DebugStringSerializer : DebugStringSerializerBase<sbyte> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Short2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Short2DebugStringSerializer : DebugStringSerializerBase<short> { }
     11  internal sealed class Short2DebugStringSerializer : DebugStringSerializerBase<short> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/String2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class String2DebugStringSerializer : DebugStringSerializerBase<string> { }
     11  internal sealed class String2DebugStringSerializer : DebugStringSerializerBase<string> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Type2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class Type2DebugStringSerializer : DebugStringSerializerBase<Type> { }
     11  internal sealed class Type2DebugStringSerializer : DebugStringSerializerBase<Type> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UInt2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class UInt2DebugStringSerializer : DebugStringSerializerBase<uint> { }
     11  internal sealed class UInt2DebugStringSerializer : DebugStringSerializerBase<uint> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ULong2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class ULong2DebugStringSerializer : DebugStringSerializerBase<ulong> { }
     11  internal sealed class ULong2DebugStringSerializer : DebugStringSerializerBase<ulong> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UShort2DebugStringSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public class UShort2DebugStringSerializer : DebugStringSerializerBase<ushort> { }
     11  internal sealed class UShort2DebugStringSerializer : DebugStringSerializerBase<ushort> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ValueType2DebugStringSerializerBase.cs

    r1823 r3036  
    99namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public abstract class DebugStringSerializerBase<T> : PrimitiveSerializerBase<T, DebugString> {
     11  internal abstract class DebugStringSerializerBase<T> : PrimitiveSerializerBase<T, DebugString> {
    1212    public override DebugString Format(T o) { return new DebugString(o.ToString()); }
    1313    public override T Parse(DebugString s) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/ByteArray2XmlSerializer.cs

    r2940 r3036  
    55
    66namespace HeuristicLab.Persistence.Default.Xml.Compact {
    7   public class ByteArray2XmlSerializer<T> : NumberArray2XmlSerializerBase<T> where T : class {
     7  internal class ByteArray2XmlSerializer<T> : NumberArray2XmlSerializerBase<T> where T : class {
    88    protected override string FormatValue(object o) {
    99      return o.ToString();
     
    1515  }
    1616
    17   public class Byte1DArray2XmlSerializer : ByteArray2XmlSerializer<byte[]> { }
     17  internal sealed class Byte1DArray2XmlSerializer : ByteArray2XmlSerializer<byte[]> { }
    1818
    19   public class Bytet2DArray2XmlSerializer : ByteArray2XmlSerializer<byte[,]> { }
     19  internal sealed class Bytet2DArray2XmlSerializer : ByteArray2XmlSerializer<byte[,]> { }
    2020
    21   public class Byte3DArray2XmlSerializer : ByteArray2XmlSerializer<byte[, ,]> { }
     21  internal sealed class Byte3DArray2XmlSerializer : ByteArray2XmlSerializer<byte[, ,]> { }
    2222}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/CompactXmlSerializerBase.cs

    r1823 r3036  
    55namespace HeuristicLab.Persistence.Default.Xml.Compact {
    66
    7   public abstract class CompactXmlSerializerBase<T> : XmlSerializerBase<T> { }
     7  internal abstract class CompactXmlSerializerBase<T> : XmlSerializerBase<T> { }
    88
    99}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs

    r1958 r3036  
    55namespace HeuristicLab.Persistence.Default.Xml.Compact {
    66
    7   public abstract class DoubleArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class {
     7  internal abstract class DoubleArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class {
    88
    99    protected override string FormatValue(object o) {
     
    1616  }
    1717
    18   public class Double1DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[]> { }
     18  internal sealed class Double1DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[]> { }
    1919
    20   public class Double2DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[,]> { }
     20  internal sealed class Double2DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[,]> { }
    2121
    22   public class Double3DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[, ,]> { }
     22  internal sealed class Double3DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[, ,]> { }
    2323
    2424}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs

    r1958 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Compact {
    88
    9   public class DoubleList2XmlSerializer : NumberEnumeration2XmlSerializerBase<List<double>> {
     9  internal sealed class DoubleList2XmlSerializer : NumberEnumeration2XmlSerializerBase<List<double>> {
    1010
    1111    protected override void Add(IEnumerable enumeration, object o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs

    r1853 r3036  
    44namespace HeuristicLab.Persistence.Default.Xml.Compact {
    55
    6   public abstract class IntArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class {
     6  internal abstract class IntArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class {
    77
    88    protected override string FormatValue(object o) {
     
    1515  }
    1616
    17   public class Int1DArray2XmlSerializer : IntArray2XmlSerializerBase<int[]> { }
     17  internal class Int1DArray2XmlSerializer : IntArray2XmlSerializerBase<int[]> { }
    1818
    19   public class Int2DArray2XmlSerializer : IntArray2XmlSerializerBase<int[,]> { }
     19  internal class Int2DArray2XmlSerializer : IntArray2XmlSerializerBase<int[,]> { }
    2020
    21   public class Int3DArray2XmlSerializer : IntArray2XmlSerializerBase<int[, ,]> { }
     21  internal class Int3DArray2XmlSerializer : IntArray2XmlSerializerBase<int[, ,]> { }
    2222
    2323}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Compact {
    88
    9   public class IntList2XmlSerializer : NumberEnumeration2XmlSerializerBase<List<int>> {
     9  internal sealed class IntList2XmlSerializer : NumberEnumeration2XmlSerializerBase<List<int>> {
    1010
    1111    protected override void Add(IEnumerable enumeration, object o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs

    r3017 r3036  
    99
    1010  [StorableClass]
    11   public abstract class NumberArray2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : class {
     11  internal abstract class NumberArray2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : class {
    1212
    1313    protected virtual string Separator { get { return ";"; } }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs

    r3017 r3036  
    99
    1010  [StorableClass]
    11   public abstract class NumberEnumeration2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : IEnumerable {
     11  internal abstract class NumberEnumeration2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : IEnumerable {
    1212
    1313    protected virtual string Separator { get { return ";"; } }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Bool2XmlSerializer : SimpleNumber2XmlSerializerBase<bool> { }
     9  internal sealed class Bool2XmlSerializer : SimpleNumber2XmlSerializerBase<bool> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Byte2XmlSerializer : SimpleNumber2XmlSerializerBase<byte> { }
     9  internal sealed class Byte2XmlSerializer : SimpleNumber2XmlSerializerBase<byte> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Char2XmlSerializer : PrimitiveSerializerBase<char, XmlString> {
     9  internal sealed class Char2XmlSerializer : PrimitiveSerializerBase<char, XmlString> {
    1010
    1111    public override XmlString Format(char c) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs

    r1853 r3036  
    55namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    66
    7   public class DateTime2XmlSerializer : PrimitiveXmlSerializerBase<DateTime> {
     7  internal sealed class DateTime2XmlSerializer : PrimitiveXmlSerializerBase<DateTime> {
    88
    99    public override XmlString Format(DateTime dt) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs

    r1958 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Decimal2XmlSerializer : PrimitiveXmlSerializerBase<decimal> {
     9  internal sealed class Decimal2XmlSerializer : PrimitiveXmlSerializerBase<decimal> {
    1010
    1111    public static decimal ParseG30(string s) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs

    r1958 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Double2XmlSerializer : PrimitiveXmlSerializerBase<double> {
     9  internal sealed class Double2XmlSerializer : PrimitiveXmlSerializerBase<double> {
    1010
    1111    public static double ParseG17(string s) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs

    r1958 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Float2XmlSerializer : PrimitiveXmlSerializerBase<float> {
     9  internal sealed class Float2XmlSerializer : PrimitiveXmlSerializerBase<float> {
    1010
    1111    public static float ParseG8(string s) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    1010
    11   public class Guid2XmlSerializer : PrimitiveXmlSerializerBase<Guid> {
     11  internal sealed class Guid2XmlSerializer : PrimitiveXmlSerializerBase<Guid> {
    1212
    1313    public override XmlString Format(Guid o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Int2XmlSerializer : SimpleNumber2XmlSerializerBase<int> { }
     9  internal sealed class Int2XmlSerializer : SimpleNumber2XmlSerializerBase<int> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Long2XmlSerializer : SimpleNumber2XmlSerializerBase<long> { }
     9  internal sealed class Long2XmlSerializer : SimpleNumber2XmlSerializerBase<long> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/PrimitiveXmlSerializerBase.cs

    r1823 r3036  
    55namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    66
     7  /// <summary>
     8  /// Common base class for primitive XML serializers.
     9  /// </summary>
     10  /// <typeparam name="T">The source type being serialized to XMl.</typeparam>
    711  public abstract class PrimitiveXmlSerializerBase<T> : XmlSerializerBase<T> { }
    812
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class SByte2XmlSerializer : SimpleNumber2XmlSerializerBase<sbyte> { }
     9  internal sealed class SByte2XmlSerializer : SimpleNumber2XmlSerializerBase<sbyte> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class Short2XmlSerializer : SimpleNumber2XmlSerializerBase<short> { }
     9  internal sealed class Short2XmlSerializer : SimpleNumber2XmlSerializerBase<short> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public abstract class SimpleNumber2XmlSerializerBase<T> : PrimitiveXmlSerializerBase<T> {
     9  internal abstract class SimpleNumber2XmlSerializerBase<T> : PrimitiveXmlSerializerBase<T> {
    1010
    1111    private static MethodInfo ParseMethod = typeof(T)
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs

    r2940 r3036  
    99namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    1010
    11   public class String2XmlSerializer : PrimitiveXmlSerializerBase<string> {
     11  /// <summary>
     12  /// Serializes a string to XML by embedding into a CDATA block.
     13  /// </summary>
     14  public sealed class String2XmlSerializer : PrimitiveXmlSerializerBase<string> {
    1215
     16    /// <summary>
     17    /// Formats the specified string.
     18    /// </summary>
     19    /// <param name="s">The string.</param>
     20    /// <returns>An XmlString that embeds the string s in a CDATA section.</returns>
    1321    public override XmlString Format(string s) {
    1422      StringBuilder sb = new StringBuilder();
     
    2129    private static Regex re = new Regex(@"<!\[CDATA\[((?:[^]]|\](?!\]>))*)\]\]>", RegexOptions.Singleline);
    2230
     31    /// <summary>
     32    /// Parses the specified XmlString into a string.
     33    /// </summary>
     34    /// <param name="x">The XMLString.</param>
     35    /// <returns>The plain string contained in the XML CDATA section.</returns>
    2336    public override string Parse(XmlString x) {
    2437      StringBuilder sb = new StringBuilder();
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs

    r3004 r3036  
    1111
    1212namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    13   public class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> {
     13  internal sealed class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> {
    1414
    1515    public override XmlString Format(Bitmap o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs

    r1853 r3036  
    99namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    1010
    11   public class TimeSpan2XmlSerializer : PrimitiveXmlSerializerBase<TimeSpan> {
     11  internal sealed class TimeSpan2XmlSerializer : PrimitiveXmlSerializerBase<TimeSpan> {
    1212
    1313    public override XmlString Format(TimeSpan o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlSerializer.cs

    r1853 r3036  
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    10   public class UInt2XmlSerializer : SimpleNumber2XmlSerializerBase<uint> { }
     10  internal sealed class UInt2XmlSerializer : SimpleNumber2XmlSerializerBase<uint> { }
    1111
    1212}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class ULong2XmlSerializer : SimpleNumber2XmlSerializerBase<ulong> { }
     9  internal sealed class ULong2XmlSerializer : SimpleNumber2XmlSerializerBase<ulong> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlSerializer.cs

    r1853 r3036  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public class UShort2XmlSerializer : SimpleNumber2XmlSerializerBase<ushort> { }
     9  internal sealed class UShort2XmlSerializer : SimpleNumber2XmlSerializerBase<ushort> { }
    1010
    1111}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs

    r3017 r3036  
    1111  [StorableClass]
    1212  public class XmlFormat : FormatBase<XmlString> {
     13    /// <summary>
     14    /// Gets the format's name.
     15    /// </summary>
     16    /// <value>The format's name.</value>
    1317    public override string Name { get { return "XML"; } }
    1418  }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs

    r3028 r3036  
    112112    }
    113113
     114    /// <summary>
     115    /// Formats the specified begin token.
     116    /// </summary>
     117    /// <param name="beginToken">The begin token.</param>
     118    /// <returns>The token in serialized form.</returns>
    114119    protected override string Format(BeginToken beginToken) {
    115120      var dict = new Dictionary<string, object> {
     
    134139    }
    135140
     141    /// <summary>
     142    /// Formats the specified end token.
     143    /// </summary>
     144    /// <param name="endToken">The end token.</param>
     145    /// <returns>The token in serialized form.</returns>
    136146    protected override string Format(EndToken endToken) {
    137147      return CreateNodeEnd(XmlStringConstants.COMPOSITE);
    138148    }
    139149
     150    /// <summary>
     151    /// Formats the specified data token.
     152    /// </summary>
     153    /// <param name="dataToken">The data token.</param>
     154    /// <returns>The token in serialized form.</returns>
    140155    protected override string Format(PrimitiveToken dataToken) {
    141156      var dict = new Dictionary<string, object> {
     
    148163    }
    149164
     165    /// <summary>
     166    /// Formats the specified ref token.
     167    /// </summary>
     168    /// <param name="refToken">The ref token.</param>
     169    /// <returns>The token in serialized form.</returns>
    150170    protected override string Format(ReferenceToken refToken) {
    151171      return CreateNode(XmlStringConstants.REFERENCE,
     
    155175    }
    156176
     177    /// <summary>
     178    /// Formats the specified null ref token.
     179    /// </summary>
     180    /// <param name="nullRefToken">The null ref token.</param>
     181    /// <returns>The token in serialized form.</returns>
    157182    protected override string Format(NullReferenceToken nullRefToken) {
    158183      return CreateNode(XmlStringConstants.NULL,
     
    161186    }
    162187
     188    /// <summary>
     189    /// Formats the specified meta info begin token.
     190    /// </summary>
     191    /// <param name="metaInfoBeginToken">The meta info begin token.</param>
     192    /// <returns>The token in serialized form.</returns>
    163193    protected override string Format(MetaInfoBeginToken metaInfoBeginToken) {
    164194      return CreateNodeStart(XmlStringConstants.METAINFO);
    165195    }
    166196
     197    /// <summary>
     198    /// Formats the specified meta info end token.
     199    /// </summary>
     200    /// <param name="metaInfoEndToken">The meta info end token.</param>
     201    /// <returns>The token in serialized form.</returns>
    167202    protected override string Format(MetaInfoEndToken metaInfoEndToken) {
    168203      return CreateNodeEnd(XmlStringConstants.METAINFO);
     
    170205
    171206    private TypeToken lastTypeToken;
     207    /// <summary>
     208    /// Formats the specified token.
     209    /// </summary>
     210    /// <param name="token">The token.</param>
     211    /// <returns>The token in serialized form.</returns>
    172212    protected override string Format(TypeToken token) {
    173213      lastTypeToken = token;
     
    205245    /// <summary>
    206246    /// Serialize an object into a file.
    207     ///
    208247    /// The XML configuration is obtained from the <c>ConfigurationService</c>.
    209248    /// The file is actually a ZIP file.
    210249    /// Compression level is set to 5 and needed assemblies are not included.
    211     /// </summary>   
     250    /// </summary>
     251    /// <param name="o">The object.</param>
     252    /// <param name="filename">The filename.</param>
    212253    public static void Serialize(object o, string filename) {
    213254      Serialize(o, filename, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, 5);
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlSerializerBase.cs

    r1823 r3036  
    44
    55namespace HeuristicLab.Persistence.Default.Xml {
    6  
     6
     7  /// <summary>
     8  /// Common base class for all primitive XML Serializers.
     9  /// </summary>
     10  /// <typeparam name="T">The source type being serialized to XML.</typeparam>
    711  public abstract class XmlSerializerBase<T> : PrimitiveSerializerBase<T, XmlString> { }
    812
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs

    r3017 r3036  
    66namespace HeuristicLab.Persistence.Default.Xml {
    77
     8  /// <summary>
     9  /// XML friendly encapsulation of string data.
     10  /// </summary>
    811  [StorableClass] 
    912  public class XmlString : ISerialData {
    1013
     14    /// <summary>
     15    /// Gets the XML string data. Essentially marks the string as
     16    /// XML compatible string.
     17    /// </summary>
     18    /// <value>The XML string data.</value>
    1119    [Storable]
    1220    public string Data { get; private set; }
     
    1422    private XmlString() { }
    1523
     24    /// <summary>
     25    /// Initializes a new instance of the <see cref="XmlString"/> class.
     26    /// </summary>
     27    /// <param name="data">The xml data.</param>
    1628    public XmlString(string data) {
    1729      Data = data;
    1830    }
    1931
     32    /// <summary>
     33    /// Returns a <see cref="System.String"/> that represents this instance.
     34    /// </summary>
     35    /// <returns>
     36    /// A <see cref="System.String"/> that represents this instance.
     37    /// </returns>
    2038    public override string ToString() {
    2139      StringBuilder sb = new StringBuilder();
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlStringConstants.cs

    r2718 r3036  
    1111namespace HeuristicLab.Persistence.Default.Xml {
    1212
    13   struct XmlStringConstants {
     13  internal struct XmlStringConstants {
    1414    public const string PRIMITIVE = "PRIMITIVE";
    1515    public const string COMPOSITE = "COMPOSITE";
  • trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj

    r3031 r3036  
    3535    <WarningLevel>4</WarningLevel>
    3636    <DocumentationFile>bin\Release\HeuristicLab.Persistence-3.3.XML</DocumentationFile>
     37    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    3738  </PropertyGroup>
    3839  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ICompositeSerializer.cs

    r3016 r3036  
    4242    /// <summary>
    4343    /// Generate MetaInfo necessary for instance creation. (e.g. dimensions
    44     /// necessary for array creation (see <see cref="ArraySerializer"/>).
     44    /// necessary for array creation.
    4545    /// </summary>
    4646    /// <param name="obj">An object.</param>
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/IFormat.cs

    r3016 r3036  
    2525  /// Marker interface for new serialization output format.  Instead of implementing this
    2626  /// interface, derive from FormatBase.
    27   /// </summary> 
     27  /// </summary>
     28  /// <typeparam name="SerialDataFormat">The type of the serial data format.</typeparam>
    2829  public interface IFormat<SerialDataFormat> : IFormat where SerialDataFormat : ISerialData {
    2930  }
Note: See TracChangeset for help on using the changeset viewer.