- Timestamp:
- 03/10/16 22:31:28 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation/RunCreationClient.cs
r13550 r13684 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.IO;25 using System.Linq;26 22 using HeuristicLab.Clients.Common; 27 23 using HeuristicLab.Common; … … 29 25 using HeuristicLab.Data; 30 26 using HeuristicLab.Persistence.Default.Xml; 27 using System; 28 using System.Collections.Generic; 29 using System.IO; 30 using System.Linq; 31 31 32 32 namespace HeuristicLab.Clients.OKB.RunCreation { … … 86 86 87 87 #region Algorithm Methods 88 public staticbyte[] GetAlgorithmData(long algorithmId) {88 public byte[] GetAlgorithmData(long algorithmId) { 89 89 return CallRunCreationService<byte[]>(s => s.GetAlgorithmData(algorithmId)); 90 90 } … … 92 92 93 93 #region Problem Methods 94 public staticbyte[] GetProblemData(long problemId) {94 public byte[] GetProblemData(long problemId) { 95 95 return CallRunCreationService<byte[]>(s => s.GetProblemData(problemId)); 96 } 97 #endregion 98 99 #region Solution Methods 100 public IEnumerable<Solution> GetSolutions(long problemId) { 101 return CallRunCreationService(s => s.GetSolutions(problemId)); 102 } 103 104 public byte[] GetSolutionData(long solutionId) { 105 return CallRunCreationService(s => s.GetSolutionData(solutionId)); 106 } 107 108 public long AddSolution(Solution solution, byte[] data) { 109 return CallRunCreationService(s => s.AddSolution(solution, data)); 110 } 111 112 public void DeleteSolution(Solution solution) { 113 CallRunCreationService(s => s.DeleteSolution(solution)); 96 114 } 97 115 #endregion … … 104 122 105 123 #region Characteristic Methods 106 public staticIEnumerable<Value> GetCharacteristicValues(long problemId) {124 public IEnumerable<Value> GetCharacteristicValues(long problemId) { 107 125 return CallRunCreationService(s => s.GetCharacteristicValues(problemId)); 108 126 } 109 127 110 public staticvoid SetCharacteristicValue(long problemId, Value v) {128 public void SetCharacteristicValue(long problemId, Value v) { 111 129 CallRunCreationService(s => s.SetCharacteristicValue(problemId, v)); 112 130 } 113 131 114 public staticvoid SetCharacteristicValues(long problemId, IEnumerable<Value> values) {132 public void SetCharacteristicValues(long problemId, IEnumerable<Value> values) { 115 133 CallRunCreationService(s => s.SetCharacteristicValues(problemId, values.ToList())); 116 134 } … … 208 226 209 227 #region Helpers 210 private staticvoid CallRunCreationService(Action<IRunCreationService> call) {228 private void CallRunCreationService(Action<IRunCreationService> call) { 211 229 RunCreationServiceClient client = ClientFactory.CreateClient<RunCreationServiceClient, IRunCreationService>(); 212 230 try { … … 220 238 } 221 239 } 222 private staticT CallRunCreationService<T>(Func<IRunCreationService, T> call) {240 private T CallRunCreationService<T>(Func<IRunCreationService, T> call) { 223 241 RunCreationServiceClient client = ClientFactory.CreateClient<RunCreationServiceClient, IRunCreationService>(); 224 242 try {
Note: See TracChangeset
for help on using the changeset viewer.