Changeset 15973 for branches/2522_RefactorPluginInfrastructure/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs
- Timestamp:
- 06/28/18 11:13:37 (6 years ago)
- Location:
- branches/2522_RefactorPluginInfrastructure
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2522_RefactorPluginInfrastructure
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs
r12504 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Drawing; 25 using System.IO; 26 using System.Linq; 22 using System.Threading; 23 using System.Threading.Tasks; 27 24 using HeuristicLab.Clients.Access; 28 25 using HeuristicLab.Collections; … … 32 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 30 using HeuristicLab.Persistence.Default.Xml; 31 using System; 32 using System.Collections.Generic; 33 using System.Drawing; 34 using System.IO; 35 using System.Linq; 34 36 35 37 namespace HeuristicLab.Clients.OKB.RunCreation { … … 67 69 try { 68 70 algorithm.Problem = problem; 69 } 70 catch (ArgumentException) { 71 } catch (ArgumentException) { 71 72 algorithm.Problem = null; 72 73 } … … 222 223 if (this.algorithmId != algorithmId) { 223 224 IAlgorithm algorithm; 224 byte[] algorithmData = RunCreationClient. GetAlgorithmData(algorithmId);225 byte[] algorithmData = RunCreationClient.Instance.GetAlgorithmData(algorithmId); 225 226 using (MemoryStream stream = new MemoryStream(algorithmData)) { 226 227 algorithm = XmlParser.Deserialize<IAlgorithm>(stream); … … 250 251 } 251 252 public void Start() { 253 Start(CancellationToken.None); 254 } 255 public void Start(CancellationToken cancellationToken) { 252 256 CheckUserPermissions(); 253 257 if (!ClientInformation.Instance.ClientExists && storeRunsAutomatically) { 254 258 throw new MissingClientRegistrationException(); 255 259 } 256 Algorithm.Start(); 260 Algorithm.Start(cancellationToken); 261 } 262 public async Task StartAsync() { await StartAsync(CancellationToken.None); } 263 public async Task StartAsync(CancellationToken cancellationToken) { 264 await AsyncHelper.DoAsync(Start, cancellationToken); 257 265 } 258 266 public void Pause() {
Note: See TracChangeset
for help on using the changeset viewer.