Changeset 9729


Ignore:
Timestamp:
07/20/13 13:15:49 (6 years ago)
Author:
ascheibe
Message:

#1886 fixed serialization bug in solution caching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapperEqualityComparer.cs

    r9723 r9729  
    2222using System.Collections.Generic;
    2323using HeuristicLab.Encodings.PermutationEncoding;
     24using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2425using HeuristicLab.PluginInfrastructure;
    2526
    2627namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
    2728  [NonDiscoverableType]
     29  [StorableClass]
    2830  public class PermutationWrapperEqualityComparer : EqualityComparer<PermutationWrapper> {
    2931    PermutationEqualityComparer peComp = new PermutationEqualityComparer();
     32
     33    public PermutationWrapperEqualityComparer() { }
     34
     35    [StorableConstructor]
     36    protected PermutationWrapperEqualityComparer(bool deserializing) {
     37      if (deserializing) {
     38        peComp = new PermutationEqualityComparer();
     39      }
     40    }
    3041
    3142    public override bool Equals(PermutationWrapper x, PermutationWrapper y) {
Note: See TracChangeset for help on using the changeset viewer.