Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6702


Ignore:
Timestamp:
09/02/11 16:03:25 (13 years ago)
Author:
epitzer
Message:

#1530 flatten serialization token hierarchy and seal frequently used classes

Location:
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tag.cs

    r5445 r6702  
    2727  /// between composite serializers and the core.
    2828  /// </summary> 
    29   public class Tag {
     29  public sealed class Tag {
    3030
    3131    /// <summary>
     
    3333    /// </summary>
    3434    /// <value>The name.</value>
    35     public string Name { get; private set; }
     35    public readonly string Name;
    3636
    3737    /// <summary>
     
    3939    /// </summary>
    4040    /// <value>The value.</value>
    41     public object Value { get; set; }
     41    public readonly object Value;
    4242
    4343    /// <summary>
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/BeginToken.cs

    r5445 r6702  
    2121
    2222
     23using HeuristicLab.Persistence.Interfaces;
    2324namespace HeuristicLab.Persistence.Core.Tokens {
    2425
     
    2728  /// Marks the beginning of a composite element.
    2829  /// </summary>
    29   public class BeginToken : CompositeTokenBase {
     30  public sealed class BeginToken : ISerializationToken {
     31
     32    /// <summary>
     33    /// The type's id.
     34    /// </summary>
     35    public readonly int TypeId;
     36
     37    /// <summary>
     38    /// The object's id for references in case it is a reference type.
     39    /// </summary>
     40    public readonly int? Id;
     41
     42    /// <summary>
     43    /// The token's name.
     44    /// </summary>
     45    public readonly string Name;
    3046
    3147    /// <summary>
     
    3551    /// <param name="typeId">The type id.</param>
    3652    /// <param name="id">The object id.</param>
    37     public BeginToken(string name, int typeId, int? id) : base(name, typeId, id) { }
     53    public BeginToken(string name, int typeId, int? id) {
     54      Name = name;
     55      TypeId = typeId;
     56      Id = id;
     57    }
    3858  }
    3959
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/EndToken.cs

    r5445 r6702  
    2121
    2222
     23using HeuristicLab.Persistence.Interfaces;
    2324namespace HeuristicLab.Persistence.Core.Tokens {
    2425
     
    2627  /// Marks the end of a composite element.
    2728  /// </summary>
    28   public class EndToken : CompositeTokenBase {
    29 
    30     /// <summary>
    31     /// Initializes a new instance of the <see cref="EndToken"/> class.
    32     /// </summary>
    33     /// <param name="name">The name.</param>
    34     /// <param name="typeId">The type id.</param>
    35     /// <param name="id">The object id.</param>
    36     public EndToken(string name, int typeId, int? id) : base(name, typeId, id) { }
    37   }
     29  public sealed class EndToken : ISerializationToken { }
    3830
    3931}
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/MetaInfoBeginToken.cs

    r5445 r6702  
    2727  /// Start of meta information.
    2828  /// </summary>
    29   public class MetaInfoBeginToken : ISerializationToken { }
     29  public sealed class MetaInfoBeginToken : ISerializationToken { }
    3030
    3131}
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/MetaInfoEndToken.cs

    r5445 r6702  
    2727  /// End of meta info.
    2828  /// </summary>
    29   public class MetaInfoEndToken : ISerializationToken { }
     29  public sealed class MetaInfoEndToken : ISerializationToken { }
    3030
    3131}
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/NulLReferenceToken.cs

    r5445 r6702  
    2121
    2222
     23using HeuristicLab.Persistence.Interfaces;
    2324namespace HeuristicLab.Persistence.Core.Tokens {
    2425
     
    2627  /// Describes a reference to <c>null</c>.
    2728  /// </summary>
    28   public class NullReferenceToken : SerializationTokenBase {
     29  public sealed class NullReferenceToken : ISerializationToken {
     30
     31    /// <summary>
     32    /// The token's name.
     33    /// </summary>
     34    public readonly string Name;
    2935
    3036    /// <summary>
     
    3238    /// </summary>
    3339    /// <param name="name">The token name.</param>
    34     public NullReferenceToken(string name) : base(name) { }
     40    public NullReferenceToken(string name) {
     41      Name = name;
     42    }
    3543  }
    3644
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/PrimitiveToken.cs

    r5445 r6702  
    2727  /// Encapsulated the serialization of a single primitive value.
    2828  /// </summary>
    29   public class PrimitiveToken : SerializationTokenBase {
     29  public sealed class PrimitiveToken : ISerializationToken {
     30
     31    /// <summary>
     32    /// The token's name.
     33    /// </summary>
     34    public readonly string Name;
    3035
    3136    /// <summary>
     
    5156    /// <param name="id">The onbject's id.</param>
    5257    /// <param name="serialData">The serialized data.</param>
    53     public PrimitiveToken(string name, int typeId, int? id, ISerialData serialData)
    54       : base(name) {
     58    public PrimitiveToken(string name, int typeId, int? id, ISerialData serialData) {
     59      Name = name;
    5560      TypeId = typeId;
    5661      Id = id;
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Core/Tokens/ReferenceToken.cs

    r5445 r6702  
    2121
    2222
     23using HeuristicLab.Persistence.Interfaces;
    2324namespace HeuristicLab.Persistence.Core.Tokens {
    24 
    2525
    2626  /// <summary>
    2727  /// References a previously used token (composite or primitive).
    2828  /// </summary>
    29   public class ReferenceToken : SerializationTokenBase {
     29  public sealed class ReferenceToken : ISerializationToken {
     30
     31    /// <summary>
     32    /// The token's name.
     33    /// </summary>
     34    public readonly string Name;
     35
    3036    /// <summary>
    3137    /// The refereced object's id.
     
    3844    /// <param name="name">The name.</param>
    3945    /// <param name="id">The referenced object's id.</param>
    40     public ReferenceToken(string name, int id)
    41       : base(name) {
     46    public ReferenceToken(string name, int id) {
     47      Name = name;
    4248      Id = id;
    4349    }
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj

    r6224 r6702  
    227227    <Compile Include="Core\Tokens\MetaInfoEndToken.cs" />
    228228    <Compile Include="Interfaces\ISerializationToken.cs" />
    229     <Compile Include="Core\Tokens\SerializationTokenBase.cs" />
    230     <Compile Include="Core\Tokens\CompositeTokenBase.cs" />
    231229    <Compile Include="Core\Tokens\BeginToken.cs" />
    232230    <Compile Include="Core\Tokens\EndToken.cs" />
Note: See TracChangeset for help on using the changeset viewer.