Changeset 1703


Ignore:
Timestamp:
04/29/09 15:30:23 (12 years ago)
Author:
epitzer
Message:

Create folder with auxiliary classes. (#606)

Location:
trunk/sources
Files:
4 added
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceConfigurationForm.cs

    r1660 r1703  
    44using System.Linq;
    55using System.Windows.Forms;
     6using HeuristicLab.Persistence.Auxiliary;
    67using HeuristicLab.Persistence.Core;
    78using HeuristicLab.Persistence.Default.Xml;
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs

    r1660 r1703  
    99using HeuristicLab.Tracing;
    1010using HeuristicLab.Persistence.Core.Tokens;
     11using HeuristicLab.Persistence.Auxiliary;
    1112
    1213namespace HeuristicLab.Persistence.Core {
     
    5051          Logger.Warn("Could not load settings.", e);
    5152        }
    52       }     
     53      }
    5354    }
    5455
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs

    r1682 r1703  
    33using HeuristicLab.Persistence.Interfaces;
    44using HeuristicLab.Persistence.Core.Tokens;
     5using HeuristicLab.Persistence.Auxiliary;
    56using HeuristicLab.Tracing;
    67using System.Reflection;
     
    7677            Logger.Error(String.Format(
    7778              "Cannot load type \"{0}\", falling back to loading with partial name", typeMapping.TypeName));
    78             string[] typeNameParts = typeMapping.TypeName.Split(new[] {','});
     79            string[] typeNameParts = typeMapping.TypeName.Split(new[] { ',' });
    7980            Assembly a = Assembly.LoadWithPartialName(typeNameParts[typeNameParts.Length - 1].Trim());
    8081            Array.Resize(ref typeNameParts, typeNameParts.Length - 1);
     
    9091          "The serialization type cache could not be loaded.\r\n" +
    9192          "This usualy happens when you are missing an Assembly/Plugin.", e);
    92       }     
     93      }
    9394    }
    9495
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs

    r1702 r1703  
    33using System;
    44using System.Linq;
     5using HeuristicLab.Persistence.Auxiliary;
    56using HeuristicLab.Persistence.Interfaces;
    67using HeuristicLab.Persistence.Core.Tokens;
     
    910using System.Runtime.InteropServices;
    1011
    11 namespace HeuristicLab.Persistence.Core { 
     12namespace HeuristicLab.Persistence.Core {
    1213
    1314  public class Serializer : IEnumerable<ISerializationToken> {
     
    5960      this.rootName = rootName;
    6061      this.configuration = configuration;
    61       obj2id = new Dictionary<object,int>(new ReferenceEqualityComparer()) { { new object(), 0 } };
     62      obj2id = new Dictionary<object, int>(new ReferenceEqualityComparer()) { { new object(), 0 } };
    6263      typeCache = new Dictionary<Type, int>();
    6364    }
     
    8283      int typeId = typeCache[type];
    8384      int? id = null;
    84       if ( ! type.IsValueType) {
     85      if (!type.IsValueType) {
    8586        id = obj2id.Count;
    8687        obj2id.Add(value, (int)id);
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/ArrayDecomposer.cs

    r1625 r1703  
    5454    }
    5555
    56     public object CreateInstance(Type t, IEnumerable<Tag> metaInfo) {     
     56    public object CreateInstance(Type t, IEnumerable<Tag> metaInfo) {
    5757      try {
    5858        IEnumerator<Tag> e = metaInfo.GetEnumerator();
     
    7474      } catch (InvalidCastException x) {
    7575        throw new PersistenceException("Invalid format of array metainfo.", x);
    76       }     
     76      }
    7777    }
    7878
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/CompactNumberArray2StringDecomposer.cs

    r1644 r1703  
    6363      try {
    6464        var tagIter = metaInfo.GetEnumerator();
    65         tagIter.MoveNext();     
     65        tagIter.MoveNext();
    6666        var valueIter = ((string)tagIter.Current.Value)
    6767          .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
     
    101101      } catch (InvalidCastException e) {
    102102        throw new PersistenceException("Invalid element data during compact array deserialization", e);
    103       }     
     103      }
    104104    }
    105105
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/KeyValuePairDecomposer.cs

    r1625 r1703  
    3131      Tag key, value;
    3232      try {
    33         key = new Tag("key", t.GetProperty("Key").GetValue(o, null));       
     33        key = new Tag("key", t.GetProperty("Key").GetValue(o, null));
    3434      } catch (Exception e) {
    3535        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/Number2StringConverter.cs

    r1644 r1703  
    22using HeuristicLab.Persistence.Interfaces;
    33using HeuristicLab.Persistence.Core;
     4using HeuristicLab.Persistence.Auxiliary;
    45using System.Collections.Generic;
    56using System.Reflection;
     
    5354
    5455    public object Parse(string stringValue, Type type) {
    55       try {       
     56      try {
    5657        return numberParsers[type]
    5758          .Invoke(null,
     
    6263      } catch (OverflowException e) {
    6364        throw new PersistenceException("Overflow during number parsing.", e);
    64       } 
     65      }
    6566    }
    6667
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/StackDecomposer.cs

    r1683 r1703  
    1818
    1919
    20     public bool CanDecompose(Type type) {     
     20    public bool CanDecompose(Type type) {
    2121      return type == typeof(Stack) ||
    2222        type.IsGenericType &&
     
    4343    }
    4444
    45     public void Populate(object instance, IEnumerable<Tag> tags, Type type) {           
     45    public void Populate(object instance, IEnumerable<Tag> tags, Type type) {
    4646      MethodInfo addMethod = type.GetMethod("Push");
    4747      try {
    4848        foreach (var tag in tags)
    49           addMethod.Invoke(instance, new[] { tag.Value });       
     49          addMethod.Invoke(instance, new[] { tag.Value });
    5050      } catch (Exception e) {
    5151        throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/TypeDecomposer.cs

    r1625 r1703  
    11using System;
    22using HeuristicLab.Persistence.Core;
     3using HeuristicLab.Persistence.Auxiliary;
    34using HeuristicLab.Persistence.Interfaces;
    45using System.Collections.Generic;
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs

    r1625 r1703  
    6262      inner.Read();
    6363      string xml = inner.ReadInnerXml();
    64       inner.Close();     
     64      inner.Close();
    6565      yield return new PrimitiveToken(name, typeId, id, new XmlString(xml));
    6666    }
  • trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj

    r1683 r1703  
    101101    <Compile Include="Core\FormatBase.cs" />
    102102    <Compile Include="Core\FormatterBase.cs" />
    103     <Compile Include="Core\TypeExtensions.cs" />
     103    <Compile Include="Auxiliary\TypeExtensions.cs" />
    104104    <Compile Include="Core\TypeMapping.cs" />
    105     <Compile Include="Core\TypeStringBuilder.cs" />
     105    <Compile Include="Auxiliary\TypeStringBuilder.cs" />
    106106    <Compile Include="Core\GeneratorBase.cs" />
    107107    <Compile Include="Default\DebugString\DebugString.cs" />
Note: See TracChangeset for help on using the changeset viewer.