- Timestamp:
- 06/28/17 22:14:18 (7 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 13682-13684,13690-13693,13709,13746
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.OKB/3.3/RunCreation/RunCreationClient.cs
r15081 r15082 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 Solution GetSolution(long solutionId) { 105 return CallRunCreationService(s => s.GetSolution(solutionId)); 106 } 107 108 public byte[] GetSolutionData(long solutionId) { 109 return CallRunCreationService(s => s.GetSolutionData(solutionId)); 110 } 111 112 public long AddSolution(Solution solution, byte[] data) { 113 return CallRunCreationService(s => s.AddSolution(solution, data)); 114 } 115 116 public void DeleteSolution(Solution solution) { 117 CallRunCreationService(s => s.DeleteSolution(solution)); 96 118 } 97 119 #endregion … … 104 126 105 127 #region Characteristic Methods 106 public staticIEnumerable<Value> GetCharacteristicValues(long problemId) {128 public IEnumerable<Value> GetCharacteristicValues(long problemId) { 107 129 return CallRunCreationService(s => s.GetCharacteristicValues(problemId)); 108 130 } 109 131 110 public staticvoid SetCharacteristicValue(long problemId, Value v) {132 public void SetCharacteristicValue(long problemId, Value v) { 111 133 CallRunCreationService(s => s.SetCharacteristicValue(problemId, v)); 112 134 } 113 135 114 public staticvoid SetCharacteristicValues(long problemId, IEnumerable<Value> values) {136 public void SetCharacteristicValues(long problemId, IEnumerable<Value> values) { 115 137 CallRunCreationService(s => s.SetCharacteristicValues(problemId, values.ToList())); 116 138 } … … 208 230 209 231 #region Helpers 210 private staticvoid CallRunCreationService(Action<IRunCreationService> call) {232 private void CallRunCreationService(Action<IRunCreationService> call) { 211 233 RunCreationServiceClient client = ClientFactory.CreateClient<RunCreationServiceClient, IRunCreationService>(); 212 234 try { … … 220 242 } 221 243 } 222 private staticT CallRunCreationService<T>(Func<IRunCreationService, T> call) {244 private T CallRunCreationService<T>(Func<IRunCreationService, T> call) { 223 245 RunCreationServiceClient client = ClientFactory.CreateClient<RunCreationServiceClient, IRunCreationService>(); 224 246 try {
Note: See TracChangeset
for help on using the changeset viewer.