Changeset 16723 for branches/2521_ProblemRefactoring/HeuristicLab.Common
- Timestamp:
- 03/28/19 16:54:20 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/ArrayExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/AsyncHelper.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/CancelEventArgs.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Cloner.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/ColorGradient.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Constants.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Content/ContentManager.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Threading; 23 24 24 25 namespace HeuristicLab.Common { … … 43 44 if (instance == null) throw new InvalidOperationException("ContentManager is not initialized."); 44 45 var func = new Func<string, IStorableContent>(instance.LoadContent); 45 func.BeginInvoke(filename, delegate (IAsyncResult result) {46 func.BeginInvoke(filename, delegate (IAsyncResult result) { 46 47 Exception error = null; 47 48 IStorableContent content = null; … … 49 50 content = func.EndInvoke(result); 50 51 content.Filename = filename; 51 } 52 catch (Exception ex) { 52 } catch (Exception ex) { 53 53 error = ex; 54 54 } … … 58 58 protected abstract IStorableContent LoadContent(string filename); 59 59 60 public static void Save(IStorableContent content, string filename, bool compressed ) {60 public static void Save(IStorableContent content, string filename, bool compressed, CancellationToken cancellationToken = default(CancellationToken)) { 61 61 if (instance == null) throw new InvalidOperationException("ContentManager is not initialized."); 62 instance.SaveContent(content, filename, compressed );62 instance.SaveContent(content, filename, compressed, cancellationToken); 63 63 content.Filename = filename; 64 64 } 65 public static void SaveAsync(IStorableContent content, string filename, bool compressed, Action<IStorableContent, Exception> savingCompletedCallback ) {65 public static void SaveAsync(IStorableContent content, string filename, bool compressed, Action<IStorableContent, Exception> savingCompletedCallback, CancellationToken cancellationToken = default(CancellationToken)) { 66 66 if (instance == null) throw new InvalidOperationException("ContentManager is not initialized."); 67 var action = new Action<IStorableContent, string, bool >(instance.SaveContent);68 action.BeginInvoke(content, filename, compressed, delegate(IAsyncResult result) {67 var action = new Action<IStorableContent, string, bool, CancellationToken>(instance.SaveContent); 68 action.BeginInvoke(content, filename, compressed, cancellationToken, delegate (IAsyncResult result) { 69 69 Exception error = null; 70 70 try { 71 71 action.EndInvoke(result); 72 72 content.Filename = filename; 73 } 74 catch (Exception ex) { 73 } catch (Exception ex) { 75 74 error = ex; 76 75 } … … 79 78 80 79 } 81 protected abstract void SaveContent(IStorableContent content, string filename, bool compressed );80 protected abstract void SaveContent(IStorableContent content, string filename, bool compressed, CancellationToken cancellationToken); 82 81 } 83 82 } -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Content/IContent.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 namespace HeuristicLab.Common { 24 [StorableType("b753064f-b2b6-4c13-b76e-2c4ec575c8cf")] 23 25 public interface IContent { } 24 26 } -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Content/IStorableContent.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 23 24 namespace HeuristicLab.Common { 25 [StorableType("25b6ffb1-8689-4ad7-81ed-bcc5065ee2a8")] 24 26 public interface IStorableContent : IContent { 25 27 string Filename { get; set; } -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/DeepCloneable.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 23 24 namespace HeuristicLab.Common { 25 [StorableType("8ed3dd0c-1cb8-4b42-8053-05bd1fcf48ef")] 24 26 /// <summary> 25 27 /// Represents a base class for all deeply cloneable objects. 26 28 /// </summary> 27 29 public abstract class DeepCloneable : IDeepCloneable { 30 [StorableConstructor] 31 protected DeepCloneable(StorableConstructorFlag _) { } 32 28 33 protected DeepCloneable(DeepCloneable original, Cloner cloner) { 29 34 cloner.RegisterClonedObject(original, this); -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/DoubleExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/EnumerableExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/EventArgs.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/ExceptionExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj
r16692 r16723 11 11 <RootNamespace>HeuristicLab.Common</RootNamespace> 12 12 <AssemblyName>HeuristicLab.Common-3.3</AssemblyName> 13 <TargetFrameworkVersion>v4. 5</TargetFrameworkVersion>13 <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> 14 14 <TargetFrameworkProfile> 15 15 </TargetFrameworkProfile> … … 133 133 <Compile Include="ArrayExtensions.cs" /> 134 134 <Compile Include="ExceptionExtensions.cs" /> 135 <Compile Include="Plugin.cs" /> 135 136 <Compile Include="Statistics\EmpiricalCumulativeDistributionFunction.cs" /> 136 137 <Compile Include="ListExtensions.cs" /> … … 144 145 <Compile Include="Statistics\EnumerableStatisticExtensions.cs" /> 145 146 <Compile Include="IDeepCloneable.cs" /> 146 <Compile Include="Plugin.cs" />147 147 <Compile Include="ReferenceEqualityComparer.cs" /> 148 148 <Compile Include="SequenceGenerator.cs" /> … … 183 183 <Install>true</Install> 184 184 </BootstrapperPackage> 185 </ItemGroup> 186 <ItemGroup> 187 <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 188 <SpecificVersion>False</SpecificVersion> 189 <HintPath>..\..\bin\HEAL.Attic.dll</HintPath> 190 <Private>False</Private> 191 </Reference> 185 192 </ItemGroup> 186 193 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/IDeepCloneable.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using HEAL.Attic; 23 24 24 25 namespace HeuristicLab.Common { 26 [StorableType("54fef53f-3ccc-4493-8973-a8bbdad32ba2")] 25 27 public interface IDeepCloneable : ICloneable { 26 28 /// <summary> -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/ListExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/MatrixExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/NaturalStringComparer.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using System.Collections.Generic; 23 23 using System.Text.RegularExpressions; 24 using HEAL.Attic; 24 25 25 26 namespace HeuristicLab.Common { 27 [StorableType("fa583e6f-b8cf-4046-b144-4c1938caa418")] 26 28 public class NaturalStringComparer : IComparer<string> { 29 30 [StorableConstructor] 31 protected NaturalStringComparer(StorableConstructorFlag _) { } 32 public NaturalStringComparer() { } 33 27 34 public int Compare(string x, string y) { 28 35 if (x == y) return 0; -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/ObjectExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 85 85 typeof(Pointer).IsAssignableFrom(type) || 86 86 type.Namespace == "System.Reflection.Emit" || 87 type.Namespace == "System.Net.Sockets" || 87 88 (type.HasElementType && ExcludeType(type.GetElementType())); 88 89 } -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Plugin.cs.frame
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [Plugin("HeuristicLab.Common", "3.3.15.$WCREV$")] 32 32 [PluginFile("HeuristicLab.Common-3.3.dll", PluginFileType.Assembly)] 33 [PluginDependency("HeuristicLab.Attic", "1.0")] 33 34 public class HeuristicLabCommonPlugin : PluginBase { 34 35 } -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Point2D.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using System.ComponentModel; 24 24 using System.Globalization; 25 using HEAL.Attic; 25 26 26 27 namespace HeuristicLab.Common { 27 28 [Serializable] 29 [StorableType("9c4b8927-6b8e-490f-a367-78091ccf1494")] 28 30 public struct Point2D<T> where T : struct, IEquatable<T> { 29 31 public static readonly Point2D<T> Empty = new Point2D<T>(); … … 33 35 get { return x; } 34 36 } 37 35 38 private T y; 36 39 public T Y { -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Properties/AssemblyInfo.cs.frame
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/ReferenceEqualityComparer.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System.Collections.Generic; 23 using HEAL.Attic; 23 24 24 25 namespace HeuristicLab.Common { 26 [StorableType("c4231b4c-94ac-4b4a-bd99-3deea73237de")] 25 27 public class ReferenceEqualityComparer : IEqualityComparer<object> { 26 28 bool IEqualityComparer<object>.Equals(object x, object y) { -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/SequenceGenerator.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Statistics/EmpiricalCumulativeDistributionFunction.cs
r15583 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/Statistics/EnumerableStatisticExtensions.cs
r15583 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/TimeSpanHelper.cs
r16692 r16723 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 23 23 24 24 using System; 25 using System.Collections.Generic;26 using System.Linq;27 25 using System.Text; 28 26 using System.Text.RegularExpressions; -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/TypeEqualityComparer.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System.Collections.Generic; 23 using HEAL.Attic; 23 24 24 25 namespace HeuristicLab.Common { 26 [StorableType("b5330cc7-9b2c-4b84-9147-1dcc6c316403")] 25 27 public class TypeEqualityComparer<T> : IEqualityComparer<T> { 26 28 -
branches/2521_ProblemRefactoring/HeuristicLab.Common/3.3/TypeExtensions.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.