Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/28/17 22:14:18 (7 years ago)
Author:
gkronber
Message:

#2588 merged r13682, r13683, r13684, r13690:13693, r13709, r13746 from trunk to stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.OKB/3.3/RunCreation/RunCreationClient.cs

    r15081 r15082  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.IO;
    25 using System.Linq;
    2622using HeuristicLab.Clients.Common;
    2723using HeuristicLab.Common;
     
    2925using HeuristicLab.Data;
    3026using HeuristicLab.Persistence.Default.Xml;
     27using System;
     28using System.Collections.Generic;
     29using System.IO;
     30using System.Linq;
    3131
    3232namespace HeuristicLab.Clients.OKB.RunCreation {
     
    8686
    8787    #region Algorithm Methods
    88     public static byte[] GetAlgorithmData(long algorithmId) {
     88    public byte[] GetAlgorithmData(long algorithmId) {
    8989      return CallRunCreationService<byte[]>(s => s.GetAlgorithmData(algorithmId));
    9090    }
     
    9292
    9393    #region Problem Methods
    94     public static byte[] GetProblemData(long problemId) {
     94    public byte[] GetProblemData(long problemId) {
    9595      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));
    96118    }
    97119    #endregion
     
    104126
    105127    #region Characteristic Methods
    106     public static IEnumerable<Value> GetCharacteristicValues(long problemId) {
     128    public IEnumerable<Value> GetCharacteristicValues(long problemId) {
    107129      return CallRunCreationService(s => s.GetCharacteristicValues(problemId));
    108130    }
    109131
    110     public static void SetCharacteristicValue(long problemId, Value v) {
     132    public void SetCharacteristicValue(long problemId, Value v) {
    111133      CallRunCreationService(s => s.SetCharacteristicValue(problemId, v));
    112134    }
    113135
    114     public static void SetCharacteristicValues(long problemId, IEnumerable<Value> values) {
     136    public void SetCharacteristicValues(long problemId, IEnumerable<Value> values) {
    115137      CallRunCreationService(s => s.SetCharacteristicValues(problemId, values.ToList()));
    116138    }
     
    208230
    209231    #region Helpers
    210     private static void CallRunCreationService(Action<IRunCreationService> call) {
     232    private void CallRunCreationService(Action<IRunCreationService> call) {
    211233      RunCreationServiceClient client = ClientFactory.CreateClient<RunCreationServiceClient, IRunCreationService>();
    212234      try {
     
    220242      }
    221243    }
    222     private static T CallRunCreationService<T>(Func<IRunCreationService, T> call) {
     244    private T CallRunCreationService<T>(Func<IRunCreationService, T> call) {
    223245      RunCreationServiceClient client = ClientFactory.CreateClient<RunCreationServiceClient, IRunCreationService>();
    224246      try {
Note: See TracChangeset for help on using the changeset viewer.