Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

Location:
trunk/sources/HeuristicLab.Persistence/3.3/Default
Files:
73 edited

Legend:

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

    r3742 r4068  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Persistence.Core;
     25using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2426using HeuristicLab.Persistence.Interfaces;
    25 using System.Collections.Generic;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using System.Text;
    2827
    2928namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    9695        }
    9796        return Array.CreateInstance(t.GetElementType(), lengths, lowerBounds);
    98       } catch (InvalidOperationException x) {
     97      }
     98      catch (InvalidOperationException x) {
    9999        throw new PersistenceException("Insufficient meta information to construct array instance.", x);
    100       } catch (InvalidCastException x) {
     100      }
     101      catch (InvalidCastException x) {
    101102        throw new PersistenceException("Invalid format of array metainfo.", x);
    102103      }
     
    129130          }
    130131        }
    131       } catch (InvalidOperationException x) {
     132      }
     133      catch (InvalidOperationException x) {
    132134        throw new PersistenceException("Insufficient data to fill array instance", x);
    133       } catch (InvalidCastException x) {
     135      }
     136      catch (InvalidCastException x) {
    134137        throw new PersistenceException("Invalid element data. Cannot fill array", x);
    135       } catch (IndexOutOfRangeException x) {
     138      }
     139      catch (IndexOutOfRangeException x) {
    136140        throw new PersistenceException("Too many elements during array deserialization", x);
    137141      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs

    r3946 r4068  
    2121
    2222using System;
    23 using System.Linq;
     23using System.Collections.Generic;
     24using System.Text;
     25using HeuristicLab.Persistence.Auxiliary;
     26using HeuristicLab.Persistence.Core;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2428using HeuristicLab.Persistence.Interfaces;
    25 using HeuristicLab.Persistence.Core;
    26 using System.Collections.Generic;
    27 using System.Reflection;
    28 using System.Globalization;
    29 using System.Text;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    31 using HeuristicLab.Persistence.Auxiliary;
    3229
    3330namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    143140        }
    144141        return a;
    145       } catch (InvalidOperationException e) {
     142      }
     143      catch (InvalidOperationException e) {
    146144        throw new PersistenceException("Insuffictient data to deserialize compact array", e);
    147       } catch (InvalidCastException e) {
     145      }
     146      catch (InvalidCastException e) {
    148147        throw new PersistenceException("Invalid element data during compact array deserialization", e);
    149148      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs

    r3742 r4068  
    2222using System;
    2323using System.Collections;
     24using System.Collections.Generic;
     25using HeuristicLab.Persistence.Auxiliary;
    2426using HeuristicLab.Persistence.Core;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2528using HeuristicLab.Persistence.Interfaces;
    26 using System.Collections.Generic;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Persistence.Auxiliary;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    7575          dict.Add(key.Value, value.Value);
    7676        }
    77       } catch (InvalidOperationException e) {
     77      }
     78      catch (InvalidOperationException e) {
    7879        throw new PersistenceException("Dictionaries must contain an even number of elements (key+value).", e);
    79       } catch (NotSupportedException e) {
     80      }
     81      catch (NotSupportedException e) {
    8082        throw new PersistenceException("The serialized dictionary type was read-only or had a fixed size and cannot be deserialized.", e);
    81       } catch (ArgumentNullException e) {
     83      }
     84      catch (ArgumentNullException e) {
    8285        throw new PersistenceException("Dictionary key was null.", e);
    83       } catch (ArgumentException e) {
     86      }
     87      catch (ArgumentException e) {
    8488        throw new PersistenceException("Duplicate dictionary key.", e);
    8589      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs

    r3742 r4068  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Persistence.Core;
     25using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2426using HeuristicLab.Persistence.Interfaces;
    25 using System.Collections.Generic;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    5656        it.MoveNext();
    5757        return Enum.Parse(t, (string)it.Current.Value);
    58       } catch (InvalidOperationException e) {
     58      }
     59      catch (InvalidOperationException e) {
    5960        throw new PersistenceException("not enough meta information to recstruct enum", e);
    60       } catch (InvalidCastException e) {
     61      }
     62      catch (InvalidCastException e) {
    6163        throw new PersistenceException("invalid meta information found while trying to reconstruct enum", e);
    6264      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs

    r3742 r4068  
    2222using System;
    2323using System.Collections;
     24using System.Collections.Generic;
    2425using System.Reflection;
     26using HeuristicLab.Persistence.Auxiliary;
    2527using HeuristicLab.Persistence.Core;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2629using HeuristicLab.Persistence.Interfaces;
    27 using System.Collections.Generic;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Persistence.Auxiliary;
    3030
    3131namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    5353        return "interface IEnumerable not implemented";
    5454      if (type.GetMethod("Add") == null)
    55         return "no 'Add()' method";     
     55        return "no 'Add()' method";
    5656      return "no 'Add()' method with one argument";
    5757    }
     
    7676        foreach (var tag in tags)
    7777          addMethod.Invoke(instance, new[] { tag.Value });
    78       } catch (Exception e) {
     78      }
     79      catch (Exception e) {
    7980        throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
    8081      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs

    r3742 r4068  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    24 using System.Collections.Generic;
     25using System.Reflection;
    2526using HeuristicLab.Persistence.Core;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2628using HeuristicLab.Persistence.Interfaces;
    27 using System.Reflection;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    4242    public bool CanSerialize(Type type) {
    4343      return type.IsGenericType &&
    44              type.GetGenericTypeDefinition() == genericKeyValuePairType;             
     44             type.GetGenericTypeDefinition() == genericKeyValuePairType;
    4545    }
    4646
    4747    public string JustifyRejection(Type type) {
    4848      if (!type.IsGenericType)
    49         return "not even generic";     
     49        return "not even generic";
    5050      return "not generic KeyValuePair<,>";
    5151    }
     
    6060      try {
    6161        key = new Tag("key", t.GetProperty("Key").GetValue(o, null));
    62       } catch (Exception e) {
     62      }
     63      catch (Exception e) {
    6364        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
    6465      }
     
    6667      try {
    6768        value = new Tag("value", t.GetProperty("Value").GetValue(o, null));
    68       } catch (Exception e) {
     69      }
     70      catch (Exception e) {
    6971        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
    7072      }
     
    8587        t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
    8688          .Single(fi => fi.Name == "value").SetValue(instance, iter.Current.Value);
    87       } catch (InvalidOperationException e) {
     89      }
     90      catch (InvalidOperationException e) {
    8891        throw new PersistenceException("Not enough components to populate KeyValuePair instance", e);
    89       } catch (Exception e) {
     92      }
     93      catch (Exception e) {
    9094        throw new PersistenceException("Exception caught during KeyValuePair reconstruction", e);
    9195      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs

    r3811 r4068  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
     25using HeuristicLab.Persistence.Auxiliary;
     26using HeuristicLab.Persistence.Core;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Persistence.Default.Xml;
     29using HeuristicLab.Persistence.Default.Xml.Primitive;
    2430using HeuristicLab.Persistence.Interfaces;
    25 using HeuristicLab.Persistence.Core;
    26 using HeuristicLab.Persistence.Auxiliary;
    27 using System.Collections.Generic;
    28 using System.Reflection;
    29 using System.Globalization;
    30 using System.Text;
    31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    32 using HeuristicLab.Persistence.Default.Xml.Primitive;
    33 using HeuristicLab.Persistence.Default.Xml;
    3431
    3532namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    6360
    6461    static Number2StringSerializer() {
    65       numberSerializerMap = new Dictionary<Type,IPrimitiveSerializer>();
     62      numberSerializerMap = new Dictionary<Type, IPrimitiveSerializer>();
    6663      foreach (var s in numberSerializers) {
    6764        numberSerializerMap[s.SourceType] = s;
     
    111108      try {
    112109        return numberSerializerMap[type].Parse(new XmlString(stringValue));
    113       } catch (FormatException e) {
     110      }
     111      catch (FormatException e) {
    114112        throw new PersistenceException("Invalid element data during number parsing.", e);
    115       } catch (OverflowException e) {
     113      }
     114      catch (OverflowException e) {
    116115        throw new PersistenceException("Overflow during number parsing.", e);
    117116      }
     
    166165        it.MoveNext();
    167166        return Parse((string)it.Current.Value, type);
    168       } catch (InvalidOperationException e) {
     167      }
     168      catch (InvalidOperationException e) {
    169169        throw new PersistenceException(
    170170          String.Format("Insufficient meta information to reconstruct number of type {0}.",
    171171          type.VersionInvariantName()), e);
    172       } catch (InvalidCastException e) {
     172      }
     173      catch (InvalidCastException e) {
    173174        throw new PersistenceException("Invalid meta information element type", e);
    174175      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs

    r3937 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Persistence.Interfaces;
    24 using HeuristicLab.Persistence.Core;
    2523using System.Collections.Generic;
    2624using System.Reflection;
    27 using System.Globalization;
    2825using System.Text;
     26using HeuristicLab.Persistence.Auxiliary;
     27using HeuristicLab.Persistence.Core;
    2928using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using HeuristicLab.Persistence.Auxiliary;
     29using HeuristicLab.Persistence.Interfaces;
    3130
    3231namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    130129          addMethod.Invoke(instance, new[] { numberConverter.Parse(value, elementType) });
    131130        }
    132       } catch (InvalidOperationException e) {
     131      }
     132      catch (InvalidOperationException e) {
    133133        throw new PersistenceException("Insufficient element data to reconstruct number enumerable", e);
    134       } catch (InvalidCastException e) {
     134      }
     135      catch (InvalidCastException e) {
    135136        throw new PersistenceException("Invalid element data during reconstruction of number enumerable", e);
    136137      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs

    r3742 r4068  
    2222using System;
    2323using System.Collections;
     24using System.Collections.Generic;
    2425using System.Reflection;
    2526using HeuristicLab.Persistence.Core;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2628using HeuristicLab.Persistence.Interfaces;
    27 using System.Collections.Generic;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using System.IO;
    3029
    3130namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    4645
    4746    public string JustifyRejection(Type type) {
    48         return "not Stack or generic Stack<>";
     47      return "not Stack or generic Stack<>";
    4948    }
    5049
     
    7372        foreach (var tag in tags)
    7473          addMethod.Invoke(instance, new[] { tag.Value });
    75       } catch (Exception e) {
     74      }
     75      catch (Exception e) {
    7676        throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
    7777      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Linq;
    24 using System.Collections.Generic;
    25 using System.Reflection;
    2623using System.Text;
    2724
     
    3835    AttributeTargets.Field | AttributeTargets.Property,
    3936    AllowMultiple = false,
    40     Inherited = false)]   
     37    Inherited = false)]
    4138  public class StorableAttribute : Attribute {
    4239
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Reflection;
    25 using System.Linq;
    2623
    27 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable { 
     24namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
    2825
    2926  /// <summary>
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Reflection;
    25 using System.Linq;
    2622
    2723namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     
    6258    /// </summary>   
    6359    AllFieldsAndAllProperties
    64   }; 
     60  };
    6561}
    6662
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableConstructorAttribute.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Reflection;
    27 using HeuristicLab.Persistence.Core;
    2823
    2924namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     
    3934  /// </summary>
    4035  [AttributeUsage(AttributeTargets.Constructor, Inherited = false, AllowMultiple = false)]
    41   public sealed class StorableConstructorAttribute : Attribute {  }
     36  public sealed class StorableConstructorAttribute : Attribute { }
    4237}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using System.Reflection;
    2723
    2824namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     
    3935    /// </summary>
    4036    BeforeSerialization,
    41    
     37
    4238    /// <summary>
    4339    /// States that this hook should be called after the storable
    4440    /// serializer hast complete re-assembled the object.
    4541    /// </summary>
    46     AfterDeserialization };
     42    AfterDeserialization
     43  };
    4744
    4845
     
    5249  /// </summary>
    5350  [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
    54   public sealed class StorableHookAttribute : Attribute {   
     51  public sealed class StorableHookAttribute : Attribute {
    5552
    5653    private readonly HookType hookType;
     
    7067    public StorableHookAttribute(HookType hookType) {
    7168      this.hookType = hookType;
    72     }   
     69    }
    7370  }
    7471}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Core;
    2723using System.Reflection;
    28 using HeuristicLab.Persistence.Auxiliary;
    2924using System.Text;
    3025
     
    5954      return ((PropertyInfo)MemberInfo).GetGetMethod(true).GetBaseDefinition().DeclaringType;
    6055    }
    61   } 
     56  }
    6257}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs

    r3917 r4068  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using HeuristicLab.Persistence.Interfaces;
     25using System.Reflection;
    2626using HeuristicLab.Persistence.Core;
    27 using System.Reflection;
    28 using HeuristicLab.Persistence.Auxiliary;
    29 using System.Text;
    30 using System.Reflection.Emit;
    3127
    3228namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r3913 r4068  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using System.Reflection;
     26using System.Reflection.Emit;
     27using System.Text;
     28using HeuristicLab.Persistence.Core;
    2529using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Core;
    27 using System.Reflection;
    28 using HeuristicLab.Persistence.Auxiliary;
    29 using System.Text;
    30 using System.Reflection.Emit;
    3130
    3231namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
     
    8786        sb.Append("class has no default constructor and no [StorableConstructor]");
    8887      if (!StorableReflection.IsEmptyOrStorableType(type, true))
    89         sb.Append("class (or one of its bases) is not empty and not marked [Storable]; ");     
     88        sb.Append("class (or one of its bases) is not empty and not marked [Storable]; ");
    9089      return sb.ToString();
    9190    }
     
    123122      try {
    124123        return GetConstructor(type)();
    125       } catch (TargetInvocationException x) {
     124      }
     125      catch (TargetInvocationException x) {
    126126        throw new PersistenceException(
    127127          "Could not instantiate storable object: Encountered exception during constructor call",
     
    188188
    189189    private Dictionary<HookDesignator, List<StorableReflection.Hook>> hookCache =
    190       new Dictionary<HookDesignator, List<StorableReflection.Hook>>();   
     190      new Dictionary<HookDesignator, List<StorableReflection.Hook>>();
    191191
    192192    #endregion
     
    203203        accessorListCache[type] = storableMembers;
    204204        return storableMembers;
    205       }     
     205      }
    206206    }
    207207
     
    224224        return c;
    225225      }
    226     }   
     226    }
    227227
    228228    private Constructor GetDefaultConstructor(Type type) {
    229229      ConstructorInfo ci = type.GetConstructor(ALL_CONSTRUCTORS, null, Type.EmptyTypes, null);
    230230      if (ci == null)
    231         return null;     
     231        return null;
    232232      DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
    233233      ILGenerator ilgen = dm.GetILGenerator();
     
    242242          if (ci.GetParameters().Length != 1 ||
    243243              ci.GetParameters()[0].ParameterType != typeof(bool))
    244             throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");         
     244            throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
    245245          DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
    246246          ILGenerator ilgen = dm.GetILGenerator();
     
    252252      }
    253253      return null;
    254     }   
     254    }
    255255
    256256    private void InvokeHook(HookType hookType, object obj) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs

    r3742 r4068  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Persistence.Interfaces;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2824using System.Reflection;
    2925using HeuristicLab.Persistence.Core;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence.Interfaces;
    3028
    3129namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3230
    3331  [StorableClass]
    34   internal sealed class StructSerializer : ICompositeSerializer {   
     32  internal sealed class StructSerializer : ICompositeSerializer {
    3533
    3634    public int Priority {
     
    3937
    4038    public bool CanSerialize(Type type) {
    41       return type.IsValueType && !type.IsPrimitive && !type.IsEnum && type.IsSealed;     
     39      return type.IsValueType && !type.IsPrimitive && !type.IsEnum && type.IsSealed;
    4240    }
    4341
     
    6361      foreach (MemberInfo mi in t.GetMembers(AllInstanceMembers)) {
    6462        if (mi.MemberType == MemberTypes.Field) {
    65           string name = mi.Name.Replace("<", "&lt;").Replace(">", "&gt;");         
     63          string name = mi.Name.Replace("<", "&lt;").Replace(">", "&gt;");
    6664          yield return new Tag(name, ((FieldInfo)mi).GetValue(obj));
    6765        }
     
    8179        MemberInfo mi = mis[0];
    8280        if (mi.MemberType == MemberTypes.Field)
    83           ((FieldInfo)mi).SetValue(instance, t.Value);       
     81          ((FieldInfo)mi).SetValue(instance, t.Value);
    8482        else
    8583          throw new PersistenceException("invalid struct member type " + mi.MemberType.ToString());
    8684      }
    8785    }
    88    
     86
    8987  }
    9088}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs

    r3742 r4068  
    2121
    2222using System;
     23using System.Collections.Generic;
     24using HeuristicLab.Persistence.Auxiliary;
    2325using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Auxiliary;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2527using HeuristicLab.Persistence.Interfaces;
    26 using System.Collections.Generic;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Persistence.Default.CompositeSerializers {
     
    5757      try {
    5858        it.MoveNext();
    59       } catch (InvalidOperationException e) {
     59      }
     60      catch (InvalidOperationException e) {
    6061        throw new PersistenceException("Insufficient meta information to instantiate Type object", e);
    6162      }
    6263      try {
    6364        return TypeLoader.Load((string)it.Current.Value);
    64       } catch (InvalidCastException e) {
     65      }
     66      catch (InvalidCastException e) {
    6567        throw new PersistenceException("Invalid meta information during reconstruction of Type object", e);
    66       } catch (TypeLoadException e) {
     68      }
     69      catch (TypeLoadException e) {
    6770        throw new PersistenceException(String.Format(
    6871          "Cannot load Type {0}, make sure all required assemblies are available.",
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
     22using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2523using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3024
    3125namespace HeuristicLab.Persistence.Default.DebugString {
     
    3428  /// Simple write-only format for debugging purposes.
    3529  /// </summary>
    36   [StorableClass] 
     30  [StorableClass]
    3731  public class DebugString : ISerialData {
    3832
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
     22using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2523using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3024
    3125namespace HeuristicLab.Persistence.Default.DebugString {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringGenerator.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    2422using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    2723using HeuristicLab.Persistence.Core;
    2824using HeuristicLab.Persistence.Core.Tokens;
     25using HeuristicLab.Persistence.Interfaces;
    2926
    3027namespace HeuristicLab.Persistence.Default.DebugString {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Bool2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Byte2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Char2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/DateTime2DebugStringSerializer.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2923
    3024namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Double2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Float2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Int2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Long2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/SByte2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Short2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/String2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Type2DebugStringSerializer.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2923
    3024namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UInt2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ULong2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UShort2DebugStringSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2922
    3023namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ValueType2DebugStringSerializerBase.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    2523using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Default.Xml;
    27 using HeuristicLab.Persistence.Core;
    28 using HeuristicLab.Persistence.Core.Tokens;
    2924
    3025namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/ByteArray2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    2622
    2723namespace HeuristicLab.Persistence.Default.Xml.Compact {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/CompactXmlSerializerBase.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using HeuristicLab.Persistence.Interfaces;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2522
    2623namespace HeuristicLab.Persistence.Default.Xml.Compact {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    2422using HeuristicLab.Persistence.Default.Xml.Primitive;
    2523
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs

    r3937 r4068  
    2020#endregion
    2121
    22 using System.Collections;
     22using System;
    2323using System.Collections.Generic;
    24 using System;
    25 using System.Linq;
     24using System.Text;
     25using HeuristicLab.Persistence.Auxiliary;
    2626using HeuristicLab.Persistence.Core;
    2727using HeuristicLab.Persistence.Default.Xml.Primitive;
    28 using System.Text;
    29 using HeuristicLab.Persistence.Auxiliary;
    3028
    3129namespace HeuristicLab.Persistence.Default.Xml.Compact {
     
    4846        }
    4947        return list;
    50       } catch (InvalidCastException e) {
     48      }
     49      catch (InvalidCastException e) {
    5150        throw new PersistenceException("Invalid element data during reconstruction of List<double>.", e);
    52       } catch (OverflowException e) {
     51      }
     52      catch (OverflowException e) {
    5353        throw new PersistenceException("Overflow during element parsing while trying to reconstruct List<double>.", e);
    5454      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    2422
    2523namespace HeuristicLab.Persistence.Default.Xml.Compact {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlSerializer.cs

    r3742 r4068  
    2222using System.Collections;
    2323using System.Collections.Generic;
    24 using System;
    25 using HeuristicLab.Persistence.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2724
    2825namespace HeuristicLab.Persistence.Default.Xml.Compact {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs

    r3945 r4068  
    2020#endregion
    2121
     22using System;
    2223using System.Collections;
     24using System.Collections.Generic;
    2325using System.Text;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System;
     26using HeuristicLab.Persistence.Auxiliary;
    2627using HeuristicLab.Persistence.Core;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Persistence.Auxiliary;
    29 using HeuristicLab.Tracing;
    30 using System.Collections.Generic;
    3129
    3230namespace HeuristicLab.Persistence.Default.Xml.Compact {
     
    5149        lengths[i] = a.GetLength(i);
    5250        nElements *= lengths[i];
    53       }     
     51      }
    5452      sb.EnsureCapacity(sb.Length + nElements * 3);
    5553      for (int i = 0; i < a.Rank; i++) {
     
    7169          }
    7270        }
    73       }     
     71      }
    7472      return new XmlString(sb.ToString());
    7573    }
     
    9290        Array a = Array.CreateInstance(this.SourceType.GetElementType(), lengths, lowerBounds);
    9391        int[] positions = (int[])lowerBounds.Clone();
    94         while (values.MoveNext()) {         
     92        while (values.MoveNext()) {
    9593          a.SetValue(ParseValue(values.Current), positions);
    9694          positions[0] += 1;
     
    107105          throw new PersistenceException("Insufficient number of elements while trying to fill number array.");
    108106        return (T)(object)a;
    109       } catch (InvalidOperationException e) {
     107      }
     108      catch (InvalidOperationException e) {
    110109        throw new PersistenceException("Insufficient information to rebuild number array.", e);
    111       } catch (InvalidCastException e) {
     110      }
     111      catch (InvalidCastException e) {
    112112        throw new PersistenceException("Invalid element data or meta data to reconstruct number array.", e);
    113       } catch (OverflowException e) {
     113      }
     114      catch (OverflowException e) {
    114115        throw new PersistenceException("Overflow during element parsing while trying to reconstruct number array.", e);
    115116      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs

    r3937 r4068  
    2020#endregion
    2121
     22using System;
    2223using System.Collections;
    2324using System.Text;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System;
     25using HeuristicLab.Persistence.Auxiliary;
    2626using HeuristicLab.Persistence.Core;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Persistence.Auxiliary;
    2928
    3029namespace HeuristicLab.Persistence.Default.Xml.Compact {
     
    5554        }
    5655        return (T)enumeration;
    57       } catch (InvalidCastException e) {
     56      }
     57      catch (InvalidCastException e) {
    5858        throw new PersistenceException("Invalid element data during reconstruction of number enumerable.", e);
    59       } catch (OverflowException e) {
     59      }
     60      catch (OverflowException e) {
    6061        throw new PersistenceException("Overflow during element parsing while trying to reconstruct number enumerable.", e);
    6162      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/EasyXmlGenerator.cs

    r3937 r4068  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    23 using System;
    24 using System.Text;
     24using System.IO;
     25using HeuristicLab.Persistence.Auxiliary;
     26using HeuristicLab.Persistence.Core;
     27using HeuristicLab.Persistence.Core.Tokens;
    2528using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Core;
    27 using System.IO;
    28 using ICSharpCode.SharpZipLib.Zip;
    2929using HeuristicLab.Tracing;
    30 using HeuristicLab.Persistence.Core.Tokens;
    31 using System.IO.Compression;
    32 using HeuristicLab.Persistence.Auxiliary;
    3330
    3431namespace HeuristicLab.Persistence.Default.Xml {
     
    146143    /// <param name="filename">The filename.</param>
    147144    /// <param name="config">The configuration.</param>
    148     public static void Serialize(object obj, string filename, Configuration config) {     
     145    public static void Serialize(object obj, string filename, Configuration config) {
    149146      try {
    150147        string tempfile = Path.GetTempFileName();
     
    157154        File.Copy(tempfile, filename, true);
    158155        File.Delete(tempfile);
    159       } catch (Exception) {
     156      }
     157      catch (Exception) {
    160158        Logger.Warn("Exception caught, no data has been written.");
    161159        throw;
     
    180178    /// <param name="stream">The stream.</param>
    181179    /// <param name="config">The configuration.</param>
    182     public static void Serialize(object obj, Stream stream, Configuration config) {     
     180    public static void Serialize(object obj, Stream stream, Configuration config) {
    183181      try {
    184182        using (StreamWriter writer = new StreamWriter(stream)) {
     
    192190          writer.Flush();
    193191        }
    194       } catch (PersistenceException) {
     192      }
     193      catch (PersistenceException) {
    195194        throw;
    196       } catch (Exception e) {
     195      }
     196      catch (Exception e) {
    197197        throw new PersistenceException("Unexpected exception during Serialization.", e);
    198198      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    2322using HeuristicLab.Persistence.Core;
    2423using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2724
    2825namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs

    r3742 r4068  
    2222using System;
    2323using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    2524
    2625namespace HeuristicLab.Persistence.Default.Xml.Primitive {
     
    3534      try {
    3635        return new DateTime(long.Parse(x.Data));
    37       } catch (Exception e) {
     36      }
     37      catch (Exception e) {
    3838        throw new PersistenceException("Exception caugth while trying to reconstruct DateTime object.", e);
    3939      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs

    r3742 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    2623using System.Globalization;
    2724
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs

    r3742 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    2623using System.Globalization;
    2724
     
    5451  }
    5552
    56  
    57  
     53
     54
    5855
    5956}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs

    r3742 r4068  
    2121
    2222using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    2623using System.Globalization;
    2724
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs

    r3742 r4068  
    2121
    2222using System;
     23using System.Globalization;
    2324using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Text;
    26 using System.Text.RegularExpressions;
    27 using System.Globalization;
    2825
    2926
     
    3936      try {
    4037        return new Guid(t.Data);
    41       } catch (FormatException x) {
     38      }
     39      catch (FormatException x) {
    4240        throw new PersistenceException("Cannot parse Guid string representation.", x);
    43       } catch (OverflowException x) {
     41      }
     42      catch (OverflowException x) {
    4443        throw new PersistenceException("Overflow during Guid parsing.", x);
    4544      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/PrimitiveXmlSerializerBase.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using HeuristicLab.Persistence.Interfaces;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2522
    2623namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs

    r3742 r4068  
    2121
    2222using System;
     23using System.Reflection;
    2324using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2725
    2826namespace HeuristicLab.Persistence.Default.Xml.Primitive {
     
    4644      try {
    4745        return (T)ParseMethod.Invoke(null, new[] { x.Data });
    48       } catch (Exception e) {
     46      }
     47      catch (Exception e) {
    4948        throw new PersistenceException("Could not parse simple number.", e);
    5049      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    2522using System.Text;
    2623using System.Text.RegularExpressions;
    27 using System.Globalization;
     24using HeuristicLab.Persistence.Core;
    2825
    2926
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    2622using System.Drawing;
     23using System.Drawing.Imaging;
    2724using System.IO;
    28 using System.Drawing.Imaging;
    29 using System.Text.RegularExpressions;
    30 using HeuristicLab.Persistence.Core;
    3125using HeuristicLab.Persistence.Default.Xml.Compact;
    3226
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs

    r3742 r4068  
    2222using System;
    2323using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Text;
    26 using System.Text.RegularExpressions;
    27 using System.Globalization;
    2824
    2925
     
    3935      try {
    4036        return TimeSpan.Parse(t.Data);
    41       } catch (FormatException x) {
     37      }
     38      catch (FormatException x) {
    4239        throw new PersistenceException("Cannot parse TimeSpan string representation.", x);
    43       } catch (OverflowException x) {
     40      }
     41      catch (OverflowException x) {
    4442        throw new PersistenceException("Overflow during TimeSpan parsing.", x);
    4543      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2822
    2923namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlSerializer.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Interfaces;
    25 using System.Reflection;
    26 using System.Globalization;
    2722
    2823namespace HeuristicLab.Persistence.Default.Xml.Primitive {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs

    r3742 r4068  
    2020#endregion
    2121
     22using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2223using HeuristicLab.Persistence.Interfaces;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2524
    2625namespace HeuristicLab.Persistence.Default.Xml {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs

    r3944 r4068  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    23 using System;
     24using System.IO;
     25using System.IO.Compression;
     26using System.Linq;
    2427using System.Text;
    25 using System.Linq;
     28using HeuristicLab.Persistence.Core;
     29using HeuristicLab.Persistence.Core.Tokens;
    2630using HeuristicLab.Persistence.Interfaces;
    27 using HeuristicLab.Persistence.Core;
    28 using System.IO;
     31using HeuristicLab.Tracing;
    2932using ICSharpCode.SharpZipLib.Zip;
    30 using HeuristicLab.Tracing;
    31 using HeuristicLab.Persistence.Core.Tokens;
    32 using System.IO.Compression;
    3333
    3434namespace HeuristicLab.Persistence.Default.Xml {
     
    257257          {"typeName", lastTypeToken.TypeName },
    258258          {"serializer", lastTypeToken.Serializer }});
    259       } finally {
     259      }
     260      finally {
    260261        lastTypeToken = null;
    261262      }
     
    367368        File.Copy(tempfile, filename, true);
    368369        File.Delete(tempfile);
    369       } catch (Exception) {
     370      }
     371      catch (Exception) {
    370372        Logger.Warn("Exception caught, no data has been written.");
    371373        throw;
     
    413415          writer.Flush();
    414416        }
    415       } catch (PersistenceException) {
     417      }
     418      catch (PersistenceException) {
    416419        throw;
    417       } catch (Exception e) {
     420      }
     421      catch (Exception e) {
    418422        throw new PersistenceException("Unexpected exception during Serialization.", e);
    419423      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs

    r3913 r4068  
    2020#endregion
    2121
    22 using System.Xml;
    23 using System.Collections.Generic;
    2422using System;
    2523using System.Collections;
     24using System.Collections.Generic;
    2625using System.IO;
     26using System.IO.Compression;
     27using System.Xml;
    2728using HeuristicLab.Persistence.Core;
     29using HeuristicLab.Persistence.Core.Tokens;
    2830using HeuristicLab.Persistence.Interfaces;
    2931using ICSharpCode.SharpZipLib.Zip;
    30 using HeuristicLab.Persistence.Core.Tokens;
    31 using System.IO.Compression;
    3232
    3333namespace HeuristicLab.Persistence.Default.Xml {
     
    7575        try {
    7676          iterator = handlers[reader.Name].Invoke();
    77         } catch (KeyNotFoundException) {
     77        }
     78        catch (KeyNotFoundException) {
    7879          throw new PersistenceException(String.Format(
    7980            "Invalid XML tag \"{0}\" in persistence file.",
     
    175176        }
    176177        return typeCache;
    177       } catch (PersistenceException) {
     178      }
     179      catch (PersistenceException) {
    178180        throw;
    179       } catch (Exception e) {
     181      }
     182      catch (Exception e) {
    180183        throw new PersistenceException("Unexpected exception during type cache parsing.", e);
    181184      }
     
    193196          return Deserialize(file);
    194197        }
    195       } finally {
     198      }
     199      finally {
    196200        TimeSpan end = System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime;
    197201        Tracing.Logger.Info(string.Format(
     
    224228          return deserializer.Deserialize(parser);
    225229        }
    226       } catch (PersistenceException) {
     230      }
     231      catch (PersistenceException) {
    227232        throw;
    228       } catch (Exception x) {
     233      }
     234      catch (Exception x) {
    229235        throw new PersistenceException("Unexpected exception during deserialization", x);
    230236      }
     
    255261        zipFile.Close();
    256262        return result;
    257       } catch (PersistenceException) {
     263      }
     264      catch (PersistenceException) {
    258265        throw;
    259       } catch (Exception e) {
     266      }
     267      catch (Exception e) {
    260268        throw new PersistenceException("Unexpected exception during deserialization", e);
    261269      }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlSerializerBase.cs

    r3742 r4068  
    2121
    2222using HeuristicLab.Persistence.Interfaces;
    23 using HeuristicLab.Persistence.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2523
    2624namespace HeuristicLab.Persistence.Default.Xml {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using HeuristicLab.Persistence.Interfaces;
    23 using HeuristicLab.Persistence.Core;
    2422using System.Text;
    2523using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HeuristicLab.Persistence.Interfaces;
    2625
    2726namespace HeuristicLab.Persistence.Default.Xml {
     
    3029  /// XML friendly encapsulation of string data.
    3130  /// </summary>
    32   [StorableClass] 
     31  [StorableClass]
    3332  public class XmlString : ISerialData {
    3433
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlStringConstants.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System;
    24 using System.Text;
    25 using HeuristicLab.Persistence.Interfaces;
    26 using HeuristicLab.Persistence.Core;
    27 using System.IO;
    28 using ICSharpCode.SharpZipLib.Zip;
    29 using HeuristicLab.Tracing;
    30 using HeuristicLab.Persistence.Core.Tokens;
    3122
    3223namespace HeuristicLab.Persistence.Default.Xml {
     
    4132    public const string METAINFO = "METAINFO";
    4233  }
    43  
     34
    4435}
Note: See TracChangeset for help on using the changeset viewer.