Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (8 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.Optimization/3.3/Algorithms
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs

    r14433 r14927  
    2828using HeuristicLab.Core;
    2929using HeuristicLab.Data;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.Persistence;
    3131
    3232namespace HeuristicLab.Optimization {
     
    3535  /// </summary>
    3636  [Item("Algorithm", "A base class for algorithms.")]
    37   [StorableClass]
     37  [StorableType("53c02848-6ed3-4e1e-8414-a3f0671267a0")]
    3838  public abstract class Algorithm : ParameterizedNamedItem, IAlgorithm {
    3939    public static new Image StaticItemImage {
     
    292292        foreach (
    293293          IStatefulItem statefulObject in
    294           this.GetObjectGraphObjects(new HashSet<object>() {Runs}).OfType<IStatefulItem>()) {
     294          this.GetObjectGraphObjects(new HashSet<object>() { Runs }).OfType<IStatefulItem>()) {
    295295          statefulObject.ClearState();
    296296        }
     
    298298        try {
    299299          runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this));
    300         }
    301         catch (ArgumentException e) {
     300        } catch (ArgumentException e) {
    302301          OnExceptionOccurred(new InvalidOperationException("Run creation failed.", e));
    303302        }
    304       }   
    305       finally {
     303      } finally {
    306304        ExecutionState = ExecutionState.Stopped;
    307305        EventHandler handler = Stopped;
  • branches/PersistenceReintegration/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs

    r14523 r14927  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828
    2929namespace HeuristicLab.Optimization {
    30   [StorableClass]
     30  [StorableType("56321a10-4f23-4ef8-88ce-35775f002e9a")]
    3131  public abstract class BasicAlgorithm : Algorithm, IStorableContent {
    3232
     
    8181        try {
    8282          t.Wait();
    83         }
    84         catch (AggregateException ex) {
     83        } catch (AggregateException ex) {
    8584          try {
    8685            ex.Flatten().Handle(x => x is OperationCanceledException);
    87           }
    88           catch (AggregateException remaining) {
     86          } catch (AggregateException remaining) {
    8987            if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]);
    9088            else OnExceptionOccurred(remaining);
     
    129127        initialized = true;
    130128        Run(cancellationToken);
    131       }
    132       finally {
     129      } finally {
    133130        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
    134131        timer.Stop();
  • branches/PersistenceReintegration/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.cs

    r14185 r14927  
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Persistence;
    2727using HeuristicLab.PluginInfrastructure;
    2828
     
    3232  /// </summary>
    3333  [Item("EngineAlgorithm", "A base class for algorithms which use an engine for execution.")]
    34   [StorableClass]
     34  [StorableType("032cf0ca-febf-4482-a5c2-49ab0bbae2e2")]
    3535  public abstract class EngineAlgorithm : Algorithm {
    3636    [Storable]
  • branches/PersistenceReintegration/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationAlgorithm.cs

    r14185 r14927  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Persistence;
    2626
    2727namespace HeuristicLab.Optimization {
     
    3030  /// </summary>
    3131  [Item("Heuristic Optimization Algorithm", "A base class for heuristic optimization algorithms.")]
    32   [StorableClass]
     32  [StorableType("4d992b71-ad1e-46b0-8208-8dac699b04bf")]
    3333  public abstract class HeuristicOptimizationAlgorithm : Algorithm {
    3434    public new IHeuristicOptimizationProblem Problem {
  • branches/PersistenceReintegration/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationEngineAlgorithm.cs

    r14185 r14927  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Persistence;
    2626
    2727namespace HeuristicLab.Optimization {
     
    3030  /// </summary>
    3131  [Item("Heuristic Optimization Enigne Algorithm", "A base class for heuristic optimization algorithms using an execution engine.")]
    32   [StorableClass]
     32  [StorableType("5eaa6392-3972-41c3-8c71-d5e5c8bd4f92")]
    3333  public abstract class HeuristicOptimizationEngineAlgorithm : EngineAlgorithm {
    3434    public new IHeuristicOptimizationProblem Problem {
  • branches/PersistenceReintegration/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs

    r14185 r14927  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Persistence;
    2626
    2727namespace HeuristicLab.Optimization {
     
    3131  [Item("User-Defined Algorithm", "An algorithm which can be defined by the user.")]
    3232  [Creatable(CreatableAttribute.Categories.Algorithms, Priority = 100)]
    33   [StorableClass]
     33  [StorableType("59cdbec9-8beb-477b-aa38-f6f8fb9807ce")]
    3434  public sealed class UserDefinedAlgorithm : EngineAlgorithm, IParameterizedItem, IStorableContent {
    3535    public string Filename { get; set; }
Note: See TracChangeset for help on using the changeset viewer.