Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/14/10 01:06:17 (14 years ago)
Author:
epitzer
Message:

Merge StorableClassType.Empty into StorableClassType.MarkedOnly and make it the default if not specified (#548)

Location:
trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs

    r3016 r3017  
    1010  /// <summary>
    1111  /// Mark the member of a class to be considered by the <c>StorableSerializer</c>.
    12   /// The class must be marked as <c>[StorableClass(StorableClassType.Empty)]</c> and the
     12  /// The class must be marked as <c>[StorableClass]</c> and the
    1313  /// <c>StorableClassType</c> should be set to <c>MarkedOnly</c> for
    1414  /// this attribute to kick in.
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs

    r3016 r3017  
    1313
    1414    /// <summary>
    15     /// Serialize the class completely empty
    16     /// (ignore further [Storable] attributes inside the class)
    17     /// </summary>
    18     Empty,
    19 
    20     /// <summary>
    2115    /// Serialize only fields and properties that have been marked
    22     /// with the [Storable] attribute
     16    /// with the [Storable] attribute. This is the default value.
    2317    /// </summary>
    2418    MarkedOnly,
     
    5751    /// Specify how members are selected for serialization.
    5852    /// </summary>
    59     public StorableClassType Type { get; set; }   
     53    public StorableClassType Type { get; set; }
    6054
    6155    /// <summary>
    62     /// Mark a class to be serialize by the <c>StorableSerizlier</c>   
    63     /// </summary>   
     56    /// Mark a class to be serialize by the <c>StorableSerizlier</c>
     57    /// </summary>
     58    /// <param name="type">The storable class type.</param>
    6459    public StorableClassAttribute(StorableClassType type) {
    6560      Type = type;
     61    }
     62
     63    /// <summary>
     64    /// Initializes a new instance of the <see cref="StorableClassAttribute"/> class.
     65    /// The default value for <see cref="StorableClassType"/> is
     66    /// <see cref="StorableClassType.MarkedOnly"/>.
     67    /// </summary>
     68    public StorableClassAttribute() {
    6669    }
    6770
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r3016 r3017  
    1111  /// <summary>
    1212  /// Intended for serialization of all custom classes. Classes should have the
    13   /// <c>[StorableClass(StorableClassType.Empty)]</c> attribute set and a serialization mode set.
     13  /// <c>[StorableClass]</c> attribute set and a serialization mode set.
    1414  /// Optionally selected fields and properties can be marked with the
    1515  /// <c>[Storable]</c> attribute.
    1616  /// </summary>
    17   [StorableClass(StorableClassType.Empty)]   
     17  [StorableClass]   
    1818  public class StorableSerializer : ICompositeSerializer {
    1919
     
    3333        StorableConstructorAttribute.GetStorableConstructor(type) == null)
    3434        return "no default constructor and no storable constructor";
    35       return "class or one of its base classes is not empty and has no [StorableClass(StorableClassType.Empty)] attribute";
     35      return "class or one of its base classes is not empty and has no [StorableClass] attribute";
    3636    }
    3737
Note: See TracChangeset for help on using the changeset viewer.