Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (7 years ago)
Author:
gkronber
Message:

#2520: changed all usages of StorableClass to use StorableType with an auto-generated GUID (did not add StorableType to other type definitions yet)

Location:
branches/PersistenceReintegration/HeuristicLab.Persistence
Files:
2 deleted
56 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs

    r14185 r14927  
    5959      try {
    6060        typeName = TypeNameParser.Parse(typeNameString);
    61       }
    62       catch (Exception) {
     61      } catch (Exception) {
    6362        throw new PersistenceException(String.Format(
    6463           "Could not parse type string \"{0}\"",
     
    6968        // try to load type normally
    7069        return LoadInternal(typeName);
    71       }
    72       catch (PersistenceException) {
     70      } catch (PersistenceException) {
    7371        #region Mono Compatibility
    7472        // if that fails, try to convert to the corresponding Mono or .NET type
     
    9290      try {
    9391        type = Type.GetType(typeName.ToString(true, true), true);
    94       }
    95       catch (Exception) {
     92      } catch (Exception) {
    9693        Logger.Warn(String.Format(
    9794          "Cannot load type \"{0}\", falling back to partial name", typeName.ToString(true, true)));
     
    109106#pragma warning restore 0618
    110107        return a.GetType(typeName.ToString(false, false), true);
    111       }
    112       catch (Exception) {
     108      } catch (Exception) {
    113109        throw new PersistenceException(String.Format(
    114110          "Could not load type \"{0}\"",
     
    130126            typeName.ToString(true, true),
    131127            type.AssemblyQualifiedName));
    132       }
    133       catch (PersistenceException) {
     128      } catch (PersistenceException) {
    134129        throw;
    135       }
    136       catch (Exception e) {
     130      } catch (Exception e) {
    137131        Logger.Warn(String.Format(
    138132          "Could not perform version check requested type was {0} while loaded type is {1}:",
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs

    r14185 r14927  
    2424using System.Linq;
    2525using System.Text;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Persistence;
    2727
    2828namespace HeuristicLab.Persistence.Auxiliary {
     
    3333  /// attributes.
    3434  /// </summary>
    35   [StorableClass]
     35  [StorableType("a83d8580-07c2-4805-a31f-23b702689e0c")]
    3636  public class TypeName {
    3737
     
    5757    public List<int> GenericArgCounts { get; private set; }
    5858
    59       /// <summary>
     59    /// <summary>
    6060    /// Gets or sets the generic args.
    6161    /// </summary>
     
    110110    /// <param name="nameSpace">The namespace.</param>
    111111    /// <param name="className">Name of the class.</param>
    112     internal TypeName(string nameSpace, string className, List<int> genericArgCounts=null) {
     112    internal TypeName(string nameSpace, string className, List<int> genericArgCounts = null) {
    113113      Namespace = nameSpace;
    114114      ClassName = className;
     
    187187    private IEnumerable<string> GetNestedClassesInCode(HashSet<string> omitNamespaces, bool includeAllNamespaces) {
    188188      var i = 0;
    189       foreach (var pair in ClassName.Split('+').Zip(GenericArgCounts, (n, c) => new {n, c})) {
     189      foreach (var pair in ClassName.Split('+').Zip(GenericArgCounts, (n, c) => new { n, c })) {
    190190        if (pair.c == 0) {
    191191          yield return pair.n;
    192         }
    193         else {
     192        } else {
    194193          yield return string.Format("{0}<{1}>",
    195194            pair.n,
     
    208207            (omitNamespaces == null && includeNamespaces) ||
    209208             omitNamespaces != null && !omitNamespaces.Contains(Namespace))
    210           sb.Append(Namespace).Append('.');
     209        sb.Append(Namespace).Append('.');
    211210      if (GenericArgCounts != null) {
    212211        sb.Append(string.Join(".", GetNestedClassesInCode(omitNamespaces, includeNamespaces)));
     
    273272        }
    274273        return false;
    275       }
    276       catch (KeyNotFoundException) {
     274      } catch (KeyNotFoundException) {
    277275        throw new Exception("Could not extract version information from type string");
    278276      }
     
    311309        }
    312310        return true;
    313       }
    314       catch (KeyNotFoundException) {
     311      } catch (KeyNotFoundException) {
    315312        throw new Exception("Could not extract version infomration from type string");
    316313      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs

    r14185 r14927  
    166166      try {
    167167        return p.TransformTypeSpec();
    168       }
    169       catch (ParseError x) {
     168      } catch (ParseError x) {
    170169        if (p.Position > 0)
    171170          throw new ParseError(String.Format(
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/Configuration.cs

    r14185 r14927  
    2222using System;
    2323using System.Collections.Generic;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HeuristicLab.Persistence;
    2525using HeuristicLab.Persistence.Interfaces;
    2626
     
    3232  /// <c>ConfigurationService</c>.
    3333  /// </summary>
    34   [StorableClass]
     34  [StorableType("181b0384-ee37-4a51-93ab-624977ee6613")]
    3535  public class Configuration {
    3636
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/FormatBase.cs

    r14185 r14927  
    2121
    2222using System;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HeuristicLab.Persistence;
    2424
    2525namespace HeuristicLab.Persistence.Interfaces {
     
    2929  /// </summary>
    3030  /// <typeparam name="SerialDataFormat">The type of the serial data format.</typeparam>
    31   [StorableClass]
     31  [StorableType("654b6142-b4c5-4b82-94e9-13b4ff8cbe53")]
    3232  public abstract class FormatBase<SerialDataFormat> : IFormat<SerialDataFormat> where SerialDataFormat : ISerialData {
    3333
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/PrimitiveSerializerBase.cs

    r14185 r14927  
    2222using System;
    2323using System.Text;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HeuristicLab.Persistence;
    2525
    2626namespace HeuristicLab.Persistence.Interfaces {
     
    3232  /// <typeparam name="Source">The source type.</typeparam>
    3333  /// <typeparam name="SerialData">The serialized type.</typeparam>
    34   [StorableClass]
     34  [StorableType("0e1d11cc-9ff0-46b6-b661-c1a408ae0917")]
    3535  public abstract class PrimitiveSerializerBase<Source, SerialData> :
    3636      IPrimitiveSerializer<Source, SerialData>
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/Serializer.cs

    r14185 r14927  
    247247            emitTypeInfo);
    248248        throw CreatePersistenceException(type, "Could not determine how to serialize a value.", true);
    249       }
    250       catch (Exception x) {
     249      } catch (Exception x) {
    251250        if (isTestRun) {
    252251          exceptions.Add(x);
     
    260259            false);
    261260        }
    262       }
    263       finally {
     261      } finally {
    264262        objectGraphTrace.Pop();
    265263      }
    266     }   
     264    }
    267265
    268266    private PersistenceException CreatePersistenceException(Type type, string message, bool appendConfig) {
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs

    r14185 r14927  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Persistence.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Persistence;
    2626using HeuristicLab.Persistence.Interfaces;
    2727
    2828namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    2929
    30   [StorableClass]
     30  [StorableType("17987df2-38f0-4158-b4c7-783ffa2737d1")]
    3131  internal sealed class ArraySerializer : ICompositeSerializer {
    3232
     
    9999        }
    100100        return Array.CreateInstance(t.GetElementType(), lengths, lowerBounds);
    101       }
    102       catch (InvalidOperationException x) {
     101      } catch (InvalidOperationException x) {
    103102        throw new PersistenceException("Insufficient meta information to construct array instance.", x);
    104       }
    105       catch (InvalidCastException x) {
     103      } catch (InvalidCastException x) {
    106104        throw new PersistenceException("Invalid format of array metainfo.", x);
    107105      }
     
    134132          }
    135133        }
    136       }
    137       catch (InvalidOperationException x) {
     134      } catch (InvalidOperationException x) {
    138135        throw new PersistenceException("Insufficient data to fill array instance", x);
    139       }
    140       catch (InvalidCastException x) {
     136      } catch (InvalidCastException x) {
    141137        throw new PersistenceException("Invalid element data. Cannot fill array", x);
    142       }
    143       catch (IndexOutOfRangeException x) {
     138      } catch (IndexOutOfRangeException x) {
    144139        throw new PersistenceException("Too many elements during array deserialization", x);
    145140      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs

    r14185 r14927  
    2626using HeuristicLab.Persistence.Auxiliary;
    2727using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Persistence;
    2929using HeuristicLab.Persistence.Interfaces;
    3030
    3131namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3232
    33   [StorableClass]
     33  [StorableType("a5c269da-4122-4ea0-9eb7-c3441be404b8")]
    3434  public sealed class CompactNumberArray2StringSerializer : ICompositeSerializer {
    3535
     
    187187        }
    188188        return a;
    189       }
    190       catch (InvalidOperationException e) {
     189      } catch (InvalidOperationException e) {
    191190        throw new PersistenceException("Insuffictient data to deserialize compact array", e);
    192       }
    193       catch (InvalidCastException e) {
     191      } catch (InvalidCastException e) {
    194192        throw new PersistenceException("Invalid element data during compact array deserialization", e);
    195193      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ConcreteDictionarySerializer.cs

    r14185 r14927  
    2525using System.Linq;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("0ce2011a-5666-40df-9874-f5eeccea5a72")]
    3333  internal sealed class ConcreteDictionarySerializer : ICompositeSerializer {
    3434
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs

    r14185 r14927  
    2525using HeuristicLab.Persistence.Auxiliary;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("813d9a0f-a611-478e-8149-e5d338c9a273")]
    3333  internal sealed class DictionarySerializer : ICompositeSerializer {
    3434
     
    7979          dict.Add(key.Value, value.Value);
    8080        }
    81       }
    82       catch (InvalidOperationException e) {
     81      } catch (InvalidOperationException e) {
    8382        throw new PersistenceException("Dictionaries must contain an even number of elements (key+value).", e);
    84       }
    85       catch (NotSupportedException e) {
     83      } catch (NotSupportedException e) {
    8684        throw new PersistenceException("The serialized dictionary type was read-only or had a fixed size and cannot be deserialized.", e);
    87       }
    88       catch (ArgumentNullException e) {
     85      } catch (ArgumentNullException e) {
    8986        throw new PersistenceException("Dictionary key was null.", e);
    90       }
    91       catch (ArgumentException e) {
     87      } catch (ArgumentException e) {
    9288        throw new PersistenceException("Duplicate dictionary key.", e);
    9389      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs

    r14185 r14927  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Persistence.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Persistence;
    2626using HeuristicLab.Persistence.Interfaces;
    2727
    2828namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    2929
    30   [StorableClass]
     30  [StorableType("7ff55c07-1c83-4d0f-924a-37c28d936d74")]
    3131  internal sealed class EnumSerializer : ICompositeSerializer {
    3232
     
    6060        it.MoveNext();
    6161        return Enum.Parse(t, (string)it.Current.Value);
    62       }
    63       catch (InvalidOperationException e) {
     62      } catch (InvalidOperationException e) {
    6463        throw new PersistenceException("not enough meta information to recstruct enum", e);
    65       }
    66       catch (InvalidCastException e) {
     64      } catch (InvalidCastException e) {
    6765        throw new PersistenceException("invalid meta information found while trying to reconstruct enum", e);
    6866      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs

    r14185 r14927  
    2626using HeuristicLab.Persistence.Auxiliary;
    2727using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Persistence;
    2929using HeuristicLab.Persistence.Interfaces;
    3030
    3131namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3232
    33   [StorableClass]
     33  [StorableType("4421c2a4-9ee1-4cfc-b98e-755a81dc5241")]
    3434  internal sealed class EnumerableSerializer : ICompositeSerializer {
    3535
     
    8080        foreach (var tag in tags)
    8181          addMethod.Invoke(instance, new[] { tag.Value });
    82       }
    83       catch (Exception e) {
     82      } catch (Exception e) {
    8483        throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
    8584      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs

    r14185 r14927  
    2626using System.Reflection;
    2727using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Persistence;
    2929using HeuristicLab.Persistence.Interfaces;
    3030
    3131namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3232
    33   [StorableClass]
     33  [StorableType("51099049-20f2-4a71-8eae-b4ea9d677115")]
    3434  internal sealed class HashSetSerializer : ICompositeSerializer {
    3535
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs

    r14185 r14927  
    2525using System.Reflection;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("97d00efc-4eb0-4dc7-a58c-977c45c2904c")]
    3333  internal sealed class KeyValuePairSerializer : ICompositeSerializer {
    3434
     
    6464      try {
    6565        key = new Tag("key", t.GetProperty("Key").GetValue(o, null));
    66       }
    67       catch (Exception e) {
     66      } catch (Exception e) {
    6867        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
    6968      }
     
    7170      try {
    7271        value = new Tag("value", t.GetProperty("Value").GetValue(o, null));
    73       }
    74       catch (Exception e) {
     72      } catch (Exception e) {
    7573        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
    7674      }
     
    9189        t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
    9290          .Single(fi => fi.Name == "value").SetValue(instance, iter.Current.Value);
    93       }
    94       catch (InvalidOperationException e) {
     91      } catch (InvalidOperationException e) {
    9592        throw new PersistenceException("Not enough components to populate KeyValuePair instance", e);
    96       }
    97       catch (Exception e) {
     93      } catch (Exception e) {
    9894        throw new PersistenceException("Exception caught during KeyValuePair reconstruction", e);
    9995      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs

    r14185 r14927  
    2525using HeuristicLab.Persistence.Auxiliary;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Default.Xml;
    2929using HeuristicLab.Persistence.Default.Xml.Primitive;
     
    4040  /// but can be useful in generating custom serializers.
    4141  /// </summary>
    42   [StorableClass]
     42  [StorableType("23af67f5-2af6-4aca-b841-21345eacfb2f")]
    4343  public sealed class Number2StringSerializer : ICompositeSerializer {
    4444
     
    115115      try {
    116116        return numberSerializerMap[Nullable.GetUnderlyingType(type) ?? type].Parse(new XmlString(stringValue));
    117       }
    118       catch (FormatException e) {
     117      } catch (FormatException e) {
    119118        throw new PersistenceException("Invalid element data during number parsing.", e);
    120       }
    121       catch (OverflowException e) {
     119      } catch (OverflowException e) {
    122120        throw new PersistenceException("Overflow during number parsing.", e);
    123121      }
     
    172170        it.MoveNext();
    173171        return Parse((string)it.Current.Value, type);
    174       }
    175       catch (InvalidOperationException e) {
     172      } catch (InvalidOperationException e) {
    176173        throw new PersistenceException(
    177174          String.Format("Insufficient meta information to reconstruct number of type {0}.",
    178175          type.VersionInvariantName()), e);
    179       }
    180       catch (InvalidCastException e) {
     176      } catch (InvalidCastException e) {
    181177        throw new PersistenceException("Invalid meta information element type", e);
    182178      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs

    r14185 r14927  
    2626using HeuristicLab.Persistence.Auxiliary;
    2727using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Persistence;
    2929using HeuristicLab.Persistence.Interfaces;
    3030
    3131namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3232
    33   [StorableClass]
     33  [StorableType("8bb7c8b8-89e5-41d4-a37e-c43e5beee451")]
    3434  internal sealed class NumberEnumerable2StringSerializer : ICompositeSerializer {
    3535
     
    136136          addMethod.Invoke(instance, new[] { numberConverter.Parse(value, elementType) });
    137137        }
    138       }
    139       catch (InvalidOperationException e) {
     138      } catch (InvalidOperationException e) {
    140139        throw new PersistenceException("Insufficient element data to reconstruct number enumerable", e);
    141       }
    142       catch (InvalidCastException e) {
     140      } catch (InvalidCastException e) {
    143141        throw new PersistenceException("Invalid element data during reconstruction of number enumerable", e);
    144142      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/QueueSerializer.cs

    r14185 r14927  
    2525using System.Reflection;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("7a0dee32-0800-4a78-a1c3-88cd97939ca0")]
    3333  internal sealed class QueueSerializer : ICompositeSerializer {
    3434
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs

    r14185 r14927  
    2525using System.Reflection;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("e395b076-6001-417e-925c-8820cc0354df")]
    3333  internal sealed class StackSerializer : ICompositeSerializer {
    3434
     
    7676        foreach (var tag in tags)
    7777          addMethod.Invoke(instance, new[] { tag.Value });
    78       }
    79       catch (Exception e) {
     78      } catch (Exception e) {
    8079        throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
    8180      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r14185 r14927  
    2828using HeuristicLab.Persistence.Core;
    2929using HeuristicLab.Persistence.Interfaces;
     30using HeuristicLab.Persistence;
    3031
    3132namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     
    3839  /// or <c>AllFieldsAndAllProperties</c>.
    3940  /// </summary>
    40   [StorableClass]
     41  [StorableType("ea2bd700-d2c9-4319-9883-b795bd8f078f")]
    4142  public sealed class StorableSerializer : ICompositeSerializer {
    4243
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs

    r14185 r14927  
    2424using System.Reflection;
    2525using HeuristicLab.Persistence.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Persistence;
    2727using HeuristicLab.Persistence.Interfaces;
    2828
    2929namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3030
    31   [StorableClass]
     31  [StorableType("070243ae-13d3-490e-ad17-81a96941ea3c")]
    3232  internal sealed class StructSerializer : ICompositeSerializer {
    3333
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TupleSerializer.cs

    r14185 r14927  
    2525using System.Reflection;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("604ea532-4a4f-4cf6-af44-1e56cf357997")]
    3333  internal sealed class TupleSerializer : ICompositeSerializer {
    3434
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs

    r14185 r14927  
    2424using HeuristicLab.Persistence.Auxiliary;
    2525using HeuristicLab.Persistence.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Persistence;
    2727using HeuristicLab.Persistence.Interfaces;
    2828
    2929namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3030
    31   [StorableClass]
     31  [StorableType("dd23170e-0998-438a-b935-2061a7a4762e")]
    3232  internal sealed class TypeSerializer : ICompositeSerializer {
    3333
     
    6666      try {
    6767        it.MoveNext();
    68       }
    69       catch (InvalidOperationException e) {
     68      } catch (InvalidOperationException e) {
    7069        throw new PersistenceException("Insufficient meta information to instantiate Type object", e);
    7170      }
    7271      try {
    7372        return TypeLoader.Load((string)it.Current.Value);
    74       }
    75       catch (InvalidCastException e) {
     73      } catch (InvalidCastException e) {
    7674        throw new PersistenceException("Invalid meta information during reconstruction of Type object", e);
    77       }
    78       catch (TypeLoadException e) {
     75      } catch (TypeLoadException e) {
    7976        throw new PersistenceException(String.Format(
    8077          "Cannot load Type {0}, make sure all required assemblies are available.",
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs

    r14185 r14927  
    2020#endregion
    2121
    22 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     22using HeuristicLab.Persistence;
    2323using HeuristicLab.Persistence.Interfaces;
    2424
     
    2828  /// Simple write-only format for debugging purposes.
    2929  /// </summary>
    30   [StorableClass]
     30  [StorableType("05a1ee13-75c0-4ff1-b403-57573364d7e3")]
    3131  public class DebugString : ISerialData {
    3232
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs

    r14185 r14927  
    2020#endregion
    2121
    22 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     22using HeuristicLab.Persistence;
    2323using HeuristicLab.Persistence.Interfaces;
    2424
     
    2828  /// Simple write-only format for debugging purposes.
    2929  /// </summary>
    30   [StorableClass]
     30  [StorableType("90f9f859-5c96-4d91-8f17-826a401ecd8f")]
    3131  public class DebugStringFormat : FormatBase<DebugString> {
    3232    /// <summary>
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringGenerator.cs

    r14185 r14927  
    185185    /// <returns>A string representation of the complete object graph.</returns>
    186186    public static string Serialize(object o, Configuration configuration) {
    187       Serializer s = new Serializer(o, configuration);
     187      var s = new HeuristicLab.Persistence.Core.Serializer(o, configuration);
    188188      DebugStringGenerator generator = new DebugStringGenerator();
    189189      StringBuilder sb = new StringBuilder();
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/ByteArray2XmlSerializer.cs

    r14185 r14927  
    3636  internal sealed class Bytet2DArray2XmlSerializer : ByteArray2XmlSerializer<byte[,]> { }
    3737
    38   internal sealed class Byte3DArray2XmlSerializer : ByteArray2XmlSerializer<byte[, ,]> { }
     38  internal sealed class Byte3DArray2XmlSerializer : ByteArray2XmlSerializer<byte[,,]> { }
    3939}
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs

    r14185 r14927  
    3939  internal sealed class Double2DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[,]> { }
    4040
    41   internal sealed class Double3DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[, ,]> { }
     41  internal sealed class Double3DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[,,]> { }
    4242
    4343}
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs

    r14185 r14927  
    4646        }
    4747        return list;
    48       }
    49       catch (InvalidCastException e) {
     48      } catch (InvalidCastException e) {
    5049        throw new PersistenceException("Invalid element data during reconstruction of List<double>.", e);
    51       }
    52       catch (OverflowException e) {
     50      } catch (OverflowException e) {
    5351        throw new PersistenceException("Overflow during element parsing while trying to reconstruct List<double>.", e);
    5452      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs

    r14185 r14927  
    3838  internal class Int2DArray2XmlSerializer : IntArray2XmlSerializerBase<int[,]> { }
    3939
    40   internal class Int3DArray2XmlSerializer : IntArray2XmlSerializerBase<int[, ,]> { }
     40  internal class Int3DArray2XmlSerializer : IntArray2XmlSerializerBase<int[,,]> { }
    4141
    4242}
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs

    r14185 r14927  
    2727using HeuristicLab.Persistence.Auxiliary;
    2828using HeuristicLab.Persistence.Core;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Persistence;
    3030
    3131namespace HeuristicLab.Persistence.Default.Xml.Compact {
    3232
    33   [StorableClass]
     33  [StorableType("ed511bc6-4889-4be1-bb57-c819d3e9e7be")]
    3434  internal abstract class NumberArray2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : class {
    3535
     
    108108          throw new PersistenceException("Insufficient number of elements while trying to fill number array.");
    109109        return (T)(object)a;
    110       }
    111       catch (InvalidOperationException e) {
     110      } catch (InvalidOperationException e) {
    112111        throw new PersistenceException("Insufficient information to rebuild number array.", e);
    113       }
    114       catch (InvalidCastException e) {
     112      } catch (InvalidCastException e) {
    115113        throw new PersistenceException("Invalid element data or meta data to reconstruct number array.", e);
    116       }
    117       catch (OverflowException e) {
     114      } catch (OverflowException e) {
    118115        throw new PersistenceException("Overflow during element parsing while trying to reconstruct number array.", e);
    119116      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs

    r14185 r14927  
    2525using HeuristicLab.Persistence.Auxiliary;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828
    2929namespace HeuristicLab.Persistence.Default.Xml.Compact {
    3030
    31   [StorableClass]
     31  [StorableType("a0910e86-de41-4862-abf5-82bbed54de70")]
    3232  internal abstract class NumberEnumeration2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : IEnumerable {
    3333
     
    5454        }
    5555        return (T)enumeration;
    56       }
    57       catch (InvalidCastException e) {
     56      } catch (InvalidCastException e) {
    5857        throw new PersistenceException("Invalid element data during reconstruction of number enumerable.", e);
    59       }
    60       catch (OverflowException e) {
     58      } catch (OverflowException e) {
    6159        throw new PersistenceException("Overflow during element parsing while trying to reconstruct number enumerable.", e);
    6260      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/EasyXmlGenerator.cs

    r14185 r14927  
    154154        File.Copy(tempfile, filename, true);
    155155        File.Delete(tempfile);
    156       }
    157       catch (Exception) {
     156      } catch (Exception) {
    158157        Logger.Warn("Exception caught, no data has been written.");
    159158        throw;
     
    181180      try {
    182181        using (StreamWriter writer = new StreamWriter(stream)) {
    183           Serializer serializer = new Serializer(obj, config);
     182          var serializer = new HeuristicLab.Persistence.Core.Serializer(obj, config);
    184183          serializer.InterleaveTypeInformation = true;
    185184          ReadableXmlGenerator generator = new ReadableXmlGenerator();
     
    190189          writer.Flush();
    191190        }
    192       }
    193       catch (PersistenceException) {
     191      } catch (PersistenceException) {
    194192        throw;
    195       }
    196       catch (Exception e) {
     193      } catch (Exception e) {
    197194        throw new PersistenceException("Unexpected exception during Serialization.", e);
    198195      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs

    r14185 r14927  
    3737
    3838    private static string ToBase64String(char c) {
    39       return string.Format("<Base64>{0}</Base64>", Convert.ToBase64String(Encoding.ASCII.GetBytes(new[] {c})));
     39      return string.Format("<Base64>{0}</Base64>", Convert.ToBase64String(Encoding.ASCII.GetBytes(new[] { c })));
    4040    }
    4141
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs

    r14185 r14927  
    3434      try {
    3535        return new DateTime(long.Parse(x.Data));
    36       }
    37       catch (Exception e) {
     36      } catch (Exception e) {
    3837        throw new PersistenceException("Exception caugth while trying to reconstruct DateTime object.", e);
    3938      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs

    r14185 r14927  
    3636      try {
    3737        return new Guid(t.Data);
    38       }
    39       catch (FormatException x) {
     38      } catch (FormatException x) {
    4039        throw new PersistenceException("Cannot parse Guid string representation.", x);
    41       }
    42       catch (OverflowException x) {
     40      } catch (OverflowException x) {
    4341        throw new PersistenceException("Overflow during Guid parsing.", x);
    4442      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs

    r14185 r14927  
    4444      try {
    4545        return (T)ParseMethod.Invoke(null, new[] { x.Data });
    46       }
    47       catch (Exception e) {
     46      } catch (Exception e) {
    4847        throw new PersistenceException("Could not parse simple number.", e);
    4948      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs

    r14185 r14927  
    2828  internal sealed class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> {
    2929
    30     public override XmlString Format(Bitmap o) {     
     30    public override XmlString Format(Bitmap o) {
    3131      MemoryStream stream = new MemoryStream();
    3232      lock (o)
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs

    r14185 r14927  
    3535      try {
    3636        return TimeSpan.Parse(t.Data);
    37       }
    38       catch (FormatException x) {
     37      } catch (FormatException x) {
    3938        throw new PersistenceException("Cannot parse TimeSpan string representation.", x);
    40       }
    41       catch (OverflowException x) {
     39      } catch (OverflowException x) {
    4240        throw new PersistenceException("Overflow during TimeSpan parsing.", x);
    4341      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs

    r14185 r14927  
    2020#endregion
    2121
    22 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     22using HeuristicLab.Persistence;
    2323using HeuristicLab.Persistence.Interfaces;
    2424
     
    2929  /// or save to a file.
    3030  /// </summary>
    31   [StorableClass]
     31  [StorableType("8c79e9a6-02d6-471c-8787-43d96d61c1db")]
    3232  public class XmlFormat : FormatBase<XmlString> {
    3333    /// <summary>
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs

    r14185 r14927  
    6161    }
    6262
    63     protected enum NodeType { Start, End, Inline } ;
     63    protected enum NodeType { Start, End, Inline };
    6464
    6565    protected static void AddXmlTagContent(StringBuilder sb, string name, Dictionary<string, string> attributes) {
     
    256256          {"typeName", lastTypeToken.TypeName },
    257257          {"serializer", lastTypeToken.Serializer }});
    258       }
    259       finally {
     258      } finally {
    260259        lastTypeToken = null;
    261260      }
     
    313312    private static void Serialize(object obj, Stream stream, Configuration config, bool includeAssemblies
    314313   , CompressionLevel compression) {
    315       Serializer serializer = new Serializer(obj, config);
     314      var serializer = new HeuristicLab.Persistence.Core.Serializer(obj, config);
    316315      Serialize(stream, includeAssemblies, compression, serializer);
    317316    }
    318317
    319     private static void Serialize(Stream stream, bool includeAssemblies, CompressionLevel compression, Serializer serializer) {
     318    private static void Serialize(Stream stream, bool includeAssemblies, CompressionLevel compression, HeuristicLab.Persistence.Core.Serializer serializer) {
    320319      try {
    321320        DateTime start = DateTime.Now;
     
    360359        Logger.Info(String.Format("serialization took {0} seconds with compression level {1}",
    361360          (DateTime.Now - start).TotalSeconds, compression));
    362       }
    363       catch (Exception) {
     361      } catch (Exception) {
    364362        Logger.Warn("Exception caught, no data has been serialized.");
    365363        throw;
     
    385383        File.Copy(tempfile, filename, true);
    386384        File.Delete(tempfile);
    387       }
    388       catch (Exception) {
     385      } catch (Exception) {
    389386        Logger.Warn("Exception caught, no data has been written.");
    390387        throw;
     
    426423                                 CompressionType compressionType = CompressionType.GZip) {
    427424      try {
    428         Serializer serializer = new Serializer(obj, config);
     425        var serializer = new HeuristicLab.Persistence.Core.Serializer(obj, config);
    429426        if (compressionType == CompressionType.Zip) {
    430427          Serialize(obj, stream, config, includeAssemblies, CompressionLevel.Optimal);
     
    432429          Serialize(stream, serializer);
    433430        }
    434       }
    435       catch (PersistenceException) {
     431      } catch (PersistenceException) {
    436432        throw;
    437       }
    438       catch (Exception e) {
     433      } catch (Exception e) {
    439434        throw new PersistenceException("Unexpected exception during Serialization.", e);
    440435      }
     
    453448                                 CompressionType compressionType = CompressionType.GZip) {
    454449      try {
    455         Serializer serializer = new Serializer(obj, config);
     450        var serializer = new HeuristicLab.Persistence.Core.Serializer(obj, config);
    456451        if (compressionType == CompressionType.Zip) {
    457452          Serialize(stream, includeAssemblies, CompressionLevel.Optimal, serializer);
     
    460455        }
    461456        types = serializer.SerializedTypes;
    462       }
    463       catch (PersistenceException) {
     457      } catch (PersistenceException) {
    464458        throw;
    465       }
    466       catch (Exception e) {
     459      } catch (Exception e) {
    467460        throw new PersistenceException("Unexpected exception during Serialization.", e);
    468461      }
    469462    }
    470463
    471     private static void Serialize(Stream stream, Serializer serializer) {
     464    private static void Serialize(Stream stream, HeuristicLab.Persistence.Core.Serializer serializer) {
    472465      using (StreamWriter writer = new StreamWriter(new GZipStream(stream, CompressionMode.Compress))) {
    473466        serializer.InterleaveTypeInformation = true;
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs

    r14185 r14927  
    8181        try {
    8282          iterator = handlers[reader.Name].Invoke();
    83         }
    84         catch (KeyNotFoundException) {
     83        } catch (KeyNotFoundException) {
    8584          throw new PersistenceException(String.Format(
    8685            "Invalid XML tag \"{0}\" in persistence file.",
     
    182181        }
    183182        return typeCache;
    184       }
    185       catch (PersistenceException) {
     183      } catch (PersistenceException) {
    186184        throw;
    187       }
    188       catch (Exception e) {
     185      } catch (Exception e) {
    189186        throw new PersistenceException("Unexpected exception during type cache parsing.", e);
    190187      }
     
    204201          }
    205202        }
    206       }
    207       finally {
     203      } finally {
    208204        TimeSpan end = System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime;
    209205        Tracing.Logger.Info(string.Format(
     
    251247            return deserializer.Deserialize(parser);
    252248          }
    253         }
    254         catch (PersistenceException) {
     249        } catch (PersistenceException) {
    255250          throw;
    256         }
    257         catch (Exception x) {
     251        } catch (Exception x) {
    258252          throw new PersistenceException("Unexpected exception during deserialization", x);
    259253        }
     
    279273
    280274        return result;
    281       }
    282       catch (PersistenceException) {
     275      } catch (PersistenceException) {
    283276        throw;
    284       }
    285       catch (Exception e) {
     277      } catch (Exception e) {
    286278        throw new PersistenceException("Unexpected exception during deserialization", e);
    287279      }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs

    r14185 r14927  
    2121
    2222using System.Text;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HeuristicLab.Persistence;
    2424using HeuristicLab.Persistence.Interfaces;
    2525
     
    2929  /// XML friendly encapsulation of string data.
    3030  /// </summary>
    31   [StorableClass]
     31  [StorableType("a358bb95-a494-4512-b1fe-53c66c77423c")]
    3232  public class XmlString : ISerialData {
    3333
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj

    r14926 r14927  
    134134    <None Include="Plugin.cs.frame" />
    135135    <Compile Include="Core\Configuration.cs" />
    136     <Compile Include="Core\PersistenceException.cs" />
    137136    <Compile Include="Core\PrimitiveSerializerBase.cs" />
    138137    <Compile Include="Core\FormatBase.cs" />
     
    157156    <Compile Include="Default\CompositeSerializers\Storable\StorableReflection.cs" />
    158157    <Compile Include="Default\CompositeSerializers\Storable\StorableMemberInfo.cs" />
    159     <Compile Include="Core\DataMemberAccessor.cs" />
    160158    <Compile Include="Default\CompositeSerializers\Storable\StorableSerializer.cs" />
    161159    <Compile Include="Default\CompositeSerializers\StructSerializer.cs" />
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/ComponentInfo.cs

    r13347 r14927  
    2121
    2222using System.Reflection;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2423
    2524namespace HeuristicLab.Persistence {
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/DataMemberAccessor.cs

    r14921 r14927  
    2424using System.Reflection.Emit;
    2525
    26 namespace HeuristicLab.Persistence.Core {
     26namespace HeuristicLab.Persistence {
    2727
    2828  /// <summary>
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/PersistenceException.cs

    r14921 r14927  
    2525using System.Text;
    2626
    27 namespace HeuristicLab.Persistence.Core {
     27namespace HeuristicLab.Persistence {
    2828
    2929  /// <summary>
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StaticCache.cs

    r14739 r14927  
    2626using System.Linq;
    2727using Google.ProtocolBuffers;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2928using HeuristicLab.PluginInfrastructure;
    3029
     
    5049      foreach (var transformer in ApplicationManager.Manager.GetInstances<ITransformer>())
    5150        RegisterTransformer(transformer);
    52 
    53 
    54       //
    55       // 
    56       // 
    57       // 
    58       // 
    59       // 
    60       // 
    61       // 
    62       // 
    63       // 
    64       //  "0F24C888-AF34-4318-9472-187B9AA85F3C"
    65 
    66 
    6751
    6852      RegisterType(new Guid("ECAEA154-6BFF-419F-8BE6-2565E9314825"), typeof(object));
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableAttribute.cs

    r14925 r14927  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
     23using System.Reflection;
    2324using System.Text;
    2425
    25 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     26namespace HeuristicLab.Persistence {
    2627
    2728
    2829  /// <summary>
    2930  /// Mark the member of a class to be considered by the <c>StorableSerializer</c>.
    30   /// The class must be marked as <c>[StorableClass]</c> and the
    31   /// <c>StorableClassType</c> should be set to <c>MarkedOnly</c> for
     31  /// The class must be marked as <c>[StorableClass("05FE6F11-87C6-435E-800A-166AFACCF5AC")]</c> and the
     32  /// <c>StorableMemberSelection</c> should be set to <c>MarkedOnly</c> for
    3233  /// this attribute to kick in.
    3334  /// </summary>
     
    3738    Inherited = false)]
    3839  public class StorableAttribute : Attribute {
     40    public static bool IsStorable(MemberInfo memberInfo) {
     41      return Attribute.IsDefined(memberInfo, typeof(StorableAttribute), false);
     42    }
     43    public static StorableAttribute GetStorableAttribute(MemberInfo memberInfo) {
     44      return (StorableAttribute)Attribute.GetCustomAttribute(memberInfo, typeof(StorableAttribute), false);
     45    }
    3946
    4047    /// <summary>
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableConstructorAttribute.cs

    r14925 r14927  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
     23using System.Reflection;
    2324
    24 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     25namespace HeuristicLab.Persistence {
    2526
    2627
     
    3435  /// </summary>
    3536  [AttributeUsage(AttributeTargets.Constructor, Inherited = false, AllowMultiple = false)]
    36   public sealed class StorableConstructorAttribute : Attribute { }
     37  public sealed class StorableConstructorAttribute : Attribute {
     38    public static bool IsStorableConstructor(ConstructorInfo constructorInfo) {
     39      return Attribute.IsDefined(constructorInfo, typeof(StorableConstructorAttribute));
     40    }
     41  }
    3742}
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableConversionAttribute.cs

    r14771 r14927  
    2828    public uint SrcVersion { get; set; }
    2929
    30     public StorableConversionAttribute(uint srcVersion)
    31     {
     30    public StorableConversionAttribute(uint srcVersion) {
    3231      this.SrcVersion = srcVersion;
    3332    }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableHookAttribute.cs

    r14925 r14927  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
     23using System.Linq;
     24using System.Reflection;
    2325
    24 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     26namespace HeuristicLab.Persistence {
    2527
    2628
     
    4951  /// </summary>
    5052  [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
     53  [StorableType("983bf558-1458-4129-b018-7e121ac3840e")]
    5154  public sealed class StorableHookAttribute : Attribute {
     55    public static bool IsStorableHook(MethodInfo methodInfo) {
     56      return Attribute.IsDefined(methodInfo, typeof(StorableHookAttribute), false);
     57    }
     58    public static StorableHookAttribute[] GetStorableHookAttributes(MethodInfo methodInfo) {
     59      return Attribute.GetCustomAttributes(methodInfo, false).OfType<StorableHookAttribute>().ToArray();
     60    }
    5261
    5362    private readonly HookType hookType;
     
    6473    /// at the <c>HookType</c> time.
    6574    /// </summary>
    66     /// <param name="hookType">Type of the hook.</param>
     75    /// <param name="hookType">MemberSelection of the hook.</param>
    6776    public StorableHookAttribute(HookType hookType) {
    6877      this.hookType = hookType;
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/TypeInfo.cs

    r14711 r14927  
    2525using System.Reflection;
    2626using System.Reflection.Emit;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
    2928namespace HeuristicLab.Persistence {
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/HeuristicLab.Persistence-4.0.csproj

    r14926 r14927  
    4848  <ItemGroup>
    4949    <Compile Include="Core\ComponentInfo.cs" />
     50    <Compile Include="Core\DataMemberAccessor.cs" />
    5051    <Compile Include="Core\Index.cs" />
     52    <Compile Include="Core\PersistenceException.cs" />
    5153    <Compile Include="Core\StaticCache.cs" />
    5254    <Compile Include="Core\Mapper.cs" />
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/ISerializer.cs

    r13347 r14927  
    2323
    2424namespace HeuristicLab.Persistence {
     25  [StorableType("81ac6e7f-1a3e-4a60-a146-c407104c02ca")]
    2526  public interface ISerializer {
    2627    void Serialize(object o, Stream stream);
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/ITransformer.cs

    r14549 r14927  
    2323
    2424namespace HeuristicLab.Persistence {
     25  [StorableType("51aec2b4-6e18-4e6d-b00b-ee656747be78")]
    2526  public interface ITransformer {
    2627    Guid Guid { get; }
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Transformers/StorableClassTransformer.cs

    r14771 r14927  
    2424using System.Linq;
    2525using System.Reflection;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2726
    2827namespace HeuristicLab.Persistence {
    2928  [Transformer("78556C88-0FEE-4602-95C7-A469B2DDB468", 100)]
     29  [StorableType("3a578289-43ca-40f8-9f1e-2bdd255cb8fb")]
    3030  internal sealed class StorableClassBoxTransformer : BoxTransformer<object> {
    3131    public override bool CanTransformType(Type type) {
     
    8989        dict.Add(mapper.GetString(component.Key), mapper.GetObject(component.Value));
    9090      }
    91      
     91
    9292      // TODO: check that all entries in the dictionary can be mapped to a field or property
    9393      foreach (var convMeth in conversionMethods) {
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs

    r14771 r14927  
    3131using System.Reflection;
    3232using Google.ProtocolBuffers;
    33 using HeuristicLab.Persistence.Core;
    34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3533
    3634namespace HeuristicLab.Persistence {
     35  [StorableType("8c7e99f5-092f-4cef-8b72-8afec1d10236")]
    3736  public abstract class BoxTransformer<T> : Transformer {
    3837    public override bool CanTransformType(Type type) {
     
    5554
    5655  #region Scalar Box Transformers
     56  [StorableType("4b800c20-e93d-4186-9ccc-9e8081c028bb")]
    5757  public abstract class BoolBoxTransformer<T> : BoxTransformer<T> {
    5858    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    6767    protected abstract T ToValueType(bool value, Type type, Mapper mapper);
    6868  }
     69  [StorableType("72b92810-3eee-4a35-b87a-0a9b06b58945")]
    6970  public abstract class IntBoxTransformer<T> : BoxTransformer<T> {
    7071    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    7980    protected abstract T ToValueType(int value, Type type, Mapper mapper);
    8081  }
     82  [StorableType("e7344a71-276d-4fc7-9d80-1f0a8b10dde5")]
    8183  public abstract class LongBoxTransformer<T> : BoxTransformer<T> {
    8284    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    9193    protected abstract T ToValueType(long value, Type type, Mapper mapper);
    9294  }
     95  [StorableType("76833301-5d1d-436d-86f6-6cfe1830405e")]
    9396  public abstract class UnsignedIntBoxTransformer<T> : BoxTransformer<T> {
    9497    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    103106    protected abstract T ToValueType(uint value, Type type, Mapper mapper);
    104107  }
     108  [StorableType("4eb19b56-7ac7-497c-b25c-a860d3d72565")]
    105109  public abstract class UnsignedLongBoxTransformer<T> : BoxTransformer<T> {
    106110    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    115119    protected abstract T ToValueType(ulong value, Type type, Mapper mapper);
    116120  }
     121  [StorableType("1a6613b2-772f-4334-b688-8b2a8483123b")]
    117122  public abstract class FloatBoxTransformer<T> : BoxTransformer<T> {
    118123    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    127132    protected abstract T ToValueType(float value, Type type, Mapper mapper);
    128133  }
     134  [StorableType("c7fee156-6310-42a6-9f07-838cef8f405e")]
    129135  public abstract class DoubleBoxTransformer<T> : BoxTransformer<T> {
    130136    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    139145    protected abstract T ToValueType(double value, Type type, Mapper mapper);
    140146  }
     147  [StorableType("f7ea684c-8784-4939-80d4-318558a8b4a4")]
    141148  public abstract class StringBoxTransformer<T> : BoxTransformer<T> {
    142149    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    151158    protected abstract T ToValueType(string value, Type type, Mapper mapper);
    152159  }
     160  [StorableType("cb1680ec-3141-437d-b28d-f17595ca6815")]
    153161  public abstract class BytesBoxTransformer<T> : BoxTransformer<T> {
    154162    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    166174
    167175  #region Array Box Transformers
     176  [StorableType("a6840c61-cf07-4e0a-a13c-392565e7326e")]
    168177  public abstract class ByteArrayBoxTransformer<T> : BoxTransformer<T> {
    169178    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    178187    protected abstract T FromByteString(ByteString byteString);
    179188  }
     189  [StorableType("543de8f9-bf32-431d-af52-8dd95cfd876f")]
    180190  public abstract class BoolArrayBoxTransformer<T> : BoxTransformer<T> {
    181191    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    190200    protected abstract T ToValueType(IEnumerable<bool> value, Type type, Mapper mapper);
    191201  }
     202  [StorableType("fb338e93-09c1-4e6e-8731-c5fefbb7fa82")]
    192203  public abstract class IntArrayBoxTransformer<T> : BoxTransformer<T> {
    193204    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    202213    protected abstract T ToValueType(IEnumerable<int> value, Type type, Mapper mapper);
    203214  }
     215  [StorableType("f751fbbd-ddd9-4f22-bf5e-9336d8913ab0")]
    204216  public abstract class LongArrayBoxTransformer<T> : BoxTransformer<T> {
    205217    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    214226    protected abstract T ToValueType(IEnumerable<long> value, Type type, Mapper mapper);
    215227  }
     228  [StorableType("912793f8-0136-4621-880c-5d6da0bbefa5")]
    216229  public abstract class UnsignedIntArrayBoxTransformer<T> : BoxTransformer<T> {
    217230    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    226239    protected abstract T ToValueType(IEnumerable<uint> value, Type type, Mapper mapper);
    227240  }
     241  [StorableType("e9b844a1-9f14-438f-abd8-8af0fdb73d77")]
    228242  public abstract class UnsignedLongArrayBoxTransformer<T> : BoxTransformer<T> {
    229243    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    238252    protected abstract T ToValueType(IEnumerable<ulong> value, Type type, Mapper mapper);
    239253  }
     254  [StorableType("f08a787d-d695-44ee-a9ac-e8b966f98c34")]
    240255  public abstract class FloatArrayBoxTransformer<T> : BoxTransformer<T> {
    241256    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    250265    protected abstract T ToValueType(IEnumerable<float> value, Type type, Mapper mapper);
    251266  }
     267  [StorableType("622efa85-484e-459e-b79d-4462ba225394")]
    252268  public abstract class DoubleArrayBoxTransformer<T> : BoxTransformer<T> {
    253269    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    262278    protected abstract T ToValueType(IEnumerable<double> value, Type type, Mapper mapper);
    263279  }
     280  [StorableType("5dfba6f6-2762-4d08-9c34-f6d10cc20913")]
    264281  public abstract class StringArrayBoxTransformer<T> : BoxTransformer<T> {
    265282    protected override void Populate(Box.Builder box, T value, Mapper mapper) {
     
    277294
    278295  [Transformer("11B822C9-46A0-4B65-AE4A-D12F63DDE9F6", 50)]
     296  [StorableType("7d783c07-2e05-4d89-9c06-b243c546e667")]
    279297  internal sealed class TypeTransformer : Transformer {
    280298    public override bool CanTransformType(Type type) {
     
    321339  #region Primitive Value Types
    322340  [Transformer("268617FE-3F0F-4029-8248-EDA420901FB6", 10000)]
     341  [StorableType("320cba58-1aaf-492b-be3b-f59eea085ebe")]
    323342  internal sealed class ObjectTransformer : BoxTransformer<object> {
    324343    protected override void Populate(Box.Builder box, object value, Mapper mapper) { }
     
    327346
    328347  [Transformer("9FA1C6A8-517E-4623-AC1B-7E9AEF6ED13D", 200)]
     348  [StorableType("be3c6d74-5c67-4a54-ab3c-f1040795d364")]
    329349  internal sealed class BoolTransformer : BoolBoxTransformer<bool> {
    330350    protected override bool ToBoxType(bool value, Mapper mapper) { return value; }
     
    333353
    334354  [Transformer("059633E9-12CB-43EC-8544-57746536E281", 201)]
     355  [StorableType("3f1e111d-3ea8-4318-884f-185ef96bdfe4")]
    335356  internal sealed class ByteTransformer : UnsignedIntBoxTransformer<byte> {
    336357    protected override uint ToBoxType(byte value, Mapper mapper) { return value; }
     
    339360
    340361  [Transformer("5DC2F3AC-0852-4B57-A861-D29CC814A94C", 202)]
     362  [StorableType("498da443-43d3-4bc4-9ee9-c41416bb5c6b")]
    341363  internal sealed class SByteTransformer : IntBoxTransformer<sbyte> {
    342364    protected override int ToBoxType(sbyte value, Mapper mapper) { return value; }
     
    345367
    346368  [Transformer("B862E642-A94A-4870-8065-06126A35A9E1", 203)]
     369  [StorableType("9f9ea850-1dd5-4dc0-abb5-8e75b22a0ffe")]
    347370  internal sealed class ShortTransformer : IntBoxTransformer<short> {
    348371    protected override int ToBoxType(short value, Mapper mapper) { return value; }
     
    351374
    352375  [Transformer("D1D3062D-F1BB-4189-AE50-D6986E1DEB4E", 204)]
     376  [StorableType("4b70fdb5-a2ed-4a08-ab17-10fb5db11ada")]
    353377  internal sealed class UShortTransformer : UnsignedIntBoxTransformer<ushort> {
    354378    protected override uint ToBoxType(ushort value, Mapper mapper) { return value; }
     
    357381
    358382  [Transformer("6C444645-3062-4D15-AD01-E6E1B0692A2B", 205)]
     383  [StorableType("fdf24c34-7c10-49bb-aad2-a668c1490381")]
    359384  internal sealed class CharTransformer : UnsignedIntBoxTransformer<char> {
    360385    protected override uint ToBoxType(char value, Mapper mapper) { return value; }
     
    363388
    364389  [Transformer("649E73B2-EFA6-4E01-BCB4-4B29D652C9CB", 206)]
     390  [StorableType("0b2bcdf7-5787-4027-acd4-46f5f7641bff")]
    365391  internal sealed class IntTransformer : IntBoxTransformer<int> {
    366392    protected override int ToBoxType(int value, Mapper mapper) { return value; }
     
    369395
    370396  [Transformer("BCF25010-81A2-49BC-88CC-407D3F393D5B", 207)]
     397  [StorableType("eec933ec-f705-435e-9b7e-e4fc4d90c21e")]
    371398  internal sealed class UIntTransformer : UnsignedIntBoxTransformer<uint> {
    372399    protected override uint ToBoxType(uint value, Mapper mapper) { return value; }
     
    375402
    376403  [Transformer("B6F6ACAE-755C-47EE-B8BF-7CDECBE19C30", 208)]
     404  [StorableType("b0edffdd-8a00-48e1-a7a1-808ddec3b933")]
    377405  internal sealed class LongTransformer : LongBoxTransformer<long> {
    378406    protected override long ToBoxType(long value, Mapper mapper) { return value; }
     
    381409
    382410  [Transformer("82333ACA-F041-44E0-B365-27C399594BA7", 209)]
     411  [StorableType("0ebd1d6b-aa2d-442b-b524-68558d77e22e")]
    383412  internal sealed class ULongTransformer : UnsignedLongBoxTransformer<ulong> {
    384413    protected override ulong ToBoxType(ulong value, Mapper mapper) { return value; }
     
    387416
    388417  [Transformer("8FE91ECF-2261-4934-BECD-C38923B7A703", 210)]
     418  [StorableType("d9f05b32-218f-4b8e-9ec7-ab5dcbbaf0fc")]
    389419  internal sealed class FloatTransformer : FloatBoxTransformer<float> {
    390420    protected override float ToBoxType(float value, Mapper mapper) { return value; }
     
    393423
    394424  [Transformer("070D23EA-7F38-46B7-A667-219BEF914E49", 211)]
     425  [StorableType("70b79b46-2713-42ac-ace6-a55ffb0624be")]
    395426  internal sealed class DoubleTransformer : DoubleBoxTransformer<double> {
    396427    protected override double ToBoxType(double value, Mapper mapper) { return value; }
     
    399430
    400431  [Transformer("BA55C7A6-C91E-4351-A889-E4A7E647F16D", 212)]
     432  [StorableType("4ed946fd-aac8-407b-bb9e-093048024d15")]
    401433  internal sealed class DateTimeTransformer : LongBoxTransformer<DateTime> {
    402434    protected override long ToBoxType(DateTime value, Mapper mapper) { return value.Ticks; }
     
    405437
    406438  [Transformer("0C91441B-2D97-432B-B493-D6EC483FC5AD", 213)]
     439  [StorableType("bbc20151-b695-43dc-a38a-a610c8410fd2")]
    407440  internal sealed class TimeSpanTransformer : LongBoxTransformer<TimeSpan> {
    408441    protected override long ToBoxType(TimeSpan value, Mapper mapper) { return value.Ticks; }
     
    411444
    412445  [Transformer("0B540EAC-79AB-40CF-8277-D2C81135FEB6", 214)]
     446  [StorableType("aac1fee2-ea34-46b4-9db7-3ae8da8927eb")]
    413447  internal sealed class ColorTransformers : IntBoxTransformer<Color> {
    414448    protected override int ToBoxType(Color value, Mapper mapper) { return value.ToArgb(); }
     
    417451
    418452  [Transformer("2E6D4A40-B4BE-425F-8E35-2D7C00054639", 215)]
     453  [StorableType("11a33d00-5edc-4c49-884a-9f2809c23b30")]
    419454  internal sealed class PointTransformer : IntArrayBoxTransformer<Point> {
    420455    protected override IEnumerable<int> ToBoxType(Point value, Mapper mapper) { return new int[] { value.X, value.Y }; }
     
    423458
    424459  [Transformer("97B5CFC8-CDFA-4EB5-B4CD-5B3CFA5CD844", 216)]
     460  [StorableType("993238c2-a2ed-4e0d-84ae-ad025f2f20f4")]
    425461  internal sealed class KeyValuePairTransformer : BoxTransformer<object> {
    426462    public override bool CanTransformType(Type type) {
     
    452488
    453489  [Transformer("EBD8BF65-D97D-4FD4-BF4F-9D58A72B6249", 217)]
     490  [StorableType("b7725dfa-94fb-4169-b375-6e46b7ca4810")]
    454491  internal sealed class DecimalTransformer : UnsignedIntBoxTransformer<decimal> {
    455492    protected override uint ToBoxType(decimal value, Mapper mapper) {
     
    478515  #region String
    479516  [Transformer("E75A594C-0034-4DAB-B28E-8F84F9F6DE8D", 218)]
     517  [StorableType("ba52fce8-bf0c-47ad-95dd-df5d9281942d")]
    480518  internal sealed class StringTransformer : UnsignedIntBoxTransformer<string> {
    481519    protected override uint ToBoxType(string value, Mapper mapper) { return mapper.GetStringId(value); }
     
    486524  #region Enum
    487525  [Transformer("93FF076B-BC4B-4C39-8C40-15E004468C98", 219)]
     526  [StorableType("f8a7dbb4-e1ce-4db8-905e-f3a05f5ca000")]
    488527  internal sealed class EnumTransformer : Transformer {
    489528    public override bool CanTransformType(Type type) {
     
    512551  #region Struct
    513552  [Transformer("89DAAFC5-726C-48D4-A4E0-2B0D27329642", 220)]
     553  [StorableType("c3c4ad38-7110-439c-b73c-d33466db3db4")]
    514554  internal sealed class StructTransformer : Transformer {
    515555    public override bool CanTransformType(Type type) {
     
    552592      foreach (var t in components) {
    553593        string name = mapper.GetString(t.Key);
    554         MemberInfo[] mis = type.GetMember(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);       
     594        MemberInfo[] mis = type.GetMember(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
    555595        if (mis.Length != 1)
    556596          throw new Exception("ambiguous struct member name " + name);
    557597        MemberInfo mi = mis[0];
    558         if(StorableAttribute.IsStorable(mi))
     598        if (StorableAttribute.IsStorable(mi))
    559599          throw new PersistenceException("Don't use stroable attributes for structs as all fields are serialized automatically.");
    560600        if (mi.MemberType == MemberTypes.Field)
     
    571611  #region Tuple
    572612  [Transformer("63A19D57-EEEF-4346-9F06-B35B15EBFFA3", 221)]
     613  [StorableType("ab537f25-dc21-4585-b743-0350a5cf1e54")]
    573614  internal sealed class TupleTransformer : Transformer {
    574615    private static readonly HashSet<Type> supportedTypes = new HashSet<Type> {
     
    616657  #region Bitmap
    617658  [Transformer("D0ADB806-2DFD-459D-B5DA-14B5F1152534", 222)]
     659  [StorableType("b13d6153-e71d-4b76-9893-81d3570403e8")]
    618660  internal sealed class BitmapTransformer : ByteArrayBoxTransformer<Bitmap> {
    619661    protected override ByteString ToByteString(Bitmap value) {
     
    636678  #region Font
    637679  [Transformer("AFF27987-3301-4D70-9601-EFCA31BDA0DB", 223)]
     680  [StorableType("b9f9a371-4dcb-478b-b0d4-6f87a15c02b5")]
    638681  internal sealed class FontTransformer : UnsignedIntArrayBoxTransformer<Font> {
    639682
     
    680723  #region Array Types
    681724  [Transformer("FF89F6D1-CDE3-498E-9166-F70AC6EB01F1", 301)]
     725  [StorableType("59d8363a-7e6c-4d29-9432-8274acd2145f")]
    682726  internal sealed class ByteArrayTransformer : ByteArrayBoxTransformer<byte[]> {
    683727    protected override ByteString ToByteString(byte[] value) {
     
    690734
    691735  [Transformer("B49B3F2D-2E97-4BAB-8705-8D29DA707C6A", 302)]
     736  [StorableType("304c7463-4575-481b-8922-6a54957305c7")]
    692737  internal sealed class SByteArrayTransformer : ByteArrayBoxTransformer<sbyte[]> {
    693738    protected override ByteString ToByteString(sbyte[] value) {
     
    700745
    701746  [Transformer("F25A73B2-6B67-4493-BD59-B836AF4455D1", 300)]
     747  [StorableType("06fdb68c-ec5e-4cb5-9ad1-063fca0b9c2e")]
    702748  internal sealed class BoolArrayTransformer : BoolArrayBoxTransformer<bool[]> {
    703749    protected override IEnumerable<bool> ToBoxType(bool[] value, Mapper mapper) { return value; }
     
    706752
    707753  [Transformer("2811FDD4-6800-4CBA-86D7-9071ED5775ED", 303)]
     754  [StorableType("832d8971-51b1-4264-b7eb-07d6e836bf7b")]
    708755  internal sealed class ShortArrayTransformer : ByteArrayBoxTransformer<short[]> {
    709756    protected override ByteString ToByteString(short[] value) {
     
    726773
    727774  [Transformer("1AAC2625-356C-40BC-8CB4-15CB3D047EB8", 304)]
     775  [StorableType("c303b4cf-ffd0-47e2-9d94-07f2d558d17f")]
    728776  internal sealed class UShortArrayTransformer : ByteArrayBoxTransformer<ushort[]> {
    729777    protected override ByteString ToByteString(ushort[] value) {
     
    746794
    747795  [Transformer("12F19098-5D49-4C23-8897-69087F1C146D", 305)]
     796  [StorableType("55f7c8b0-f2aa-4830-857d-6ce2807da138")]
    748797  internal sealed class CharArrayTransformer : ByteArrayBoxTransformer<char[]> {
    749798    protected override ByteString ToByteString(char[] value) {
     
    766815
    767816  [Transformer("5F6DC3BC-4433-4AE9-A636-4BD126F7DACD", 306)]
     817  [StorableType("e7089621-5236-4d37-a592-c8a0816c59fa")]
    768818  internal sealed class IntArrayTransformer : IntArrayBoxTransformer<int[]> {
    769819    protected override IEnumerable<int> ToBoxType(int[] value, Mapper mapper) { return value; }
     
    772822
    773823  [Transformer("3F10274F-D350-4C82-89EA-A5EB36D4EFCC", 307)]
     824  [StorableType("0972d235-5e21-4abf-84f8-aad1bbfdff40")]
    774825  internal sealed class UIntArrayTransformer : UnsignedIntArrayBoxTransformer<uint[]> {
    775826    protected override IEnumerable<uint> ToBoxType(uint[] value, Mapper mapper) { return value; }
     
    778829
    779830  [Transformer("E9D550E2-57F7-47F3-803D-37A619DA1A5C", 308)]
     831  [StorableType("0c656d5d-11dc-4a75-895a-06701048cd70")]
    780832  internal sealed class LongArrayTransformer : LongArrayBoxTransformer<long[]> {
    781833    protected override IEnumerable<long> ToBoxType(long[] value, Mapper mapper) { return value; }
     
    784836
    785837  [Transformer("C02A205B-2176-4282-AC2B-ADEF96DDBE24", 309)]
     838  [StorableType("c5f87514-a6c1-400b-9a6c-8adcf980f701")]
    786839  internal sealed class ULongArrayTransformer : UnsignedLongArrayBoxTransformer<ulong[]> {
    787840    protected override IEnumerable<ulong> ToBoxType(ulong[] value, Mapper mapper) { return value; }
     
    790843
    791844  [Transformer("3C4590D9-C76E-4AFB-98FD-E50D3D051648", 310)]
     845  [StorableType("ecc63624-1b78-4bef-8326-74c1a43078ff")]
    792846  internal sealed class FloatArrayTransformer : FloatArrayBoxTransformer<float[]> {
    793847    protected override IEnumerable<float> ToBoxType(float[] value, Mapper mapper) { return value; }
     
    796850
    797851  [Transformer("FB98C399-9323-4470-9A85-9186C2B2D5D4", 311)]
     852  [StorableType("03025baa-f57a-48de-b0e2-8e6dc10740ee")]
    798853  internal sealed class DoubleArrayTransformer : DoubleArrayBoxTransformer<double[]> {
    799854    protected override IEnumerable<double> ToBoxType(double[] value, Mapper mapper) { return value; }
     
    802857
    803858  [Transformer("68332513-9CF1-47FA-A093-6DDB663186EC", 312)]
     859  [StorableType("791ea34d-e071-4ef2-812b-eb8e2faced45")]
    804860  internal sealed class StringArrayTransformer : StringArrayBoxTransformer<string[]> {
    805861    protected override IEnumerable<string> ToBoxType(string[] value, Mapper mapper) { return value; }
     
    808864
    809865  [Transformer("B01ADF0A-ACAA-444E-9F82-0C7C2AF1F490", 400)]
     866  [StorableType("56ae4f46-9fc1-4243-a07f-7b7c24e30545")]
    810867  internal sealed class ArrayTransformer : Transformer {
    811868    public override bool CanTransformType(Type type) {
     
    897954
    898955  [Transformer("4FA5EAAF-ECC7-4A9C-84E7-6583DA96F3B9", 500)]
     956  [StorableType("b19c0fe5-6bba-4492-af91-c111edce77dc")]
    899957  internal sealed class EnumerableTransformer : Transformer {
    900958    private static readonly HashSet<Type> supportedTypes = new HashSet<Type> {
     
    922980        var comparer = propertyInfo.GetValue(value);
    923981        var comparerType = comparer.GetType();
    924         if (Default.CompositeSerializers.Storable.StorableTypeAttribute.IsStorableType(comparerType))
     982        if (StorableTypeAttribute.IsStorableType(comparerType))
    925983          uIntArrayBox.AddValues(mapper.GetBoxId(comparer));
    926984        else if (comparerType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy).Any())
     
    9701028
    9711029  [Transformer("C47A62F5-F113-4A43-A8EE-CF817EC799A2", 501)]
     1030  [StorableType("ba53df84-dc97-4d8d-a493-868972ed1002")]
    9721031  internal sealed class DictionaryTransformer : Transformer {
    9731032    public override bool CanTransformType(Type type) {
     
    9921051
    9931052      var comparerType = comparer.GetType();
    994       if (Default.CompositeSerializers.Storable.StorableTypeAttribute.IsStorableType(comparerType))
     1053      if (StorableTypeAttribute.IsStorableType(comparerType))
    9951054        dictionaryBox.SetComparerId(mapper.GetBoxId(comparer));
    9961055      else if (comparerType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy).Any())
Note: See TracChangeset for help on using the changeset viewer.