Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/19 13:41:42 (5 years ago)
Author:
gkronber
Message:

#2520: merged changes from PersistenceOverhaul branch (r16451:16564) into trunk

Location:
trunk
Files:
11 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.Designer.cs

    r15583 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs

    r15583 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/ExecutableScriptView.cs

    r15583 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj

    r13080 r16565  
    1010    <RootNamespace>HeuristicLab.Scripting.Views</RootNamespace>
    1111    <AssemblyName>HeuristicLab.Scripting.Views-3.3</AssemblyName>
    12     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
    1414    <TargetFrameworkProfile />
     
    8181  </PropertyGroup>
    8282  <ItemGroup>
     83    <Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
     84      <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
     85    </Reference>
     86    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     87      <HintPath>..\..\packages\HEAL.Attic.1.0.0-pre01\lib\netstandard2.0\HEAL.Attic.dll</HintPath>
     88    </Reference>
    8389    <Reference Include="System" />
    8490    <Reference Include="System.Core" />
    8591    <Reference Include="System.Drawing" />
     92    <Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
     93      <HintPath>..\..\packages\System.Drawing.Common.4.5.1\lib\net461\System.Drawing.Common.dll</HintPath>
     94    </Reference>
    8695    <Reference Include="System.Windows.Forms" />
    8796    <Reference Include="System.Xml.Linq" />
     
    91100  </ItemGroup>
    92101  <ItemGroup>
     102    <None Include="packages.config" />
    93103    <None Include="Plugin.cs.frame" />
    94104    <Compile Include="CSharpScriptView.cs">
  • trunk/HeuristicLab.Scripting.Views/3.3/Plugin.cs.frame

    r15589 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/Properties/AssemblyInfo.cs.frame

    r15589 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs

    r16506 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/ScriptView.cs

    r16528 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/VariableStoreView.Designer.cs

    r15583 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs

    r16526 r16565  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232using HeuristicLab.MainForm.WindowsForms;
    3333using HeuristicLab.Persistence.Core;
    34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     34using HEAL.Attic;
    3535using HeuristicLab.Persistence.Default.Xml;
    3636using HeuristicLab.PluginInfrastructure;
     37using System.IO;
    3738
    3839namespace HeuristicLab.Scripting.Views {
     
    486487    private bool IsSerializable(KeyValuePair<string, object> variable) {
    487488      Type type = null;
    488       bool serializable;
     489      bool serializable = false;
    489490
    490491      if (variable.Value != null) {
    491492        type = variable.Value.GetType();
    492493        if (serializableLookup.TryGetValue(type, out serializable)) return serializable;
    493         if (StorableClassAttribute.IsStorableClass(type)) return serializableLookup[type] = true;
    494       }
    495 
    496       var ser = new Serializer(variable, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()), "ROOT", true);
     494        if (StorableTypeAttribute.IsStorableType(type)) return serializableLookup[type] = true;
     495      }
     496
     497      var ser = new ProtoBufSerializer();
    497498      try {
    498         serializable = ser.Count() > 0; // try to create all serialization tokens
     499        using (var memStream = new MemoryStream()) {
     500          ser.Serialize(variable.Value, memStream); // try to serialize to memory stream
     501          serializable = true;
     502        }
    499503      } catch (PersistenceException) {
    500504        serializable = false;
Note: See TracChangeset for help on using the changeset viewer.