Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7554


Ignore:
Timestamp:
03/05/12 22:33:19 (12 years ago)
Author:
ascheibe
Message:

#1174 improved access service handling to work with Hive

Location:
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs

    r7334 r7554  
    2525using System.IO;
    2626using System.Linq;
     27using HeuristicLab.Clients.Access;
    2728using HeuristicLab.Collections;
    2829using HeuristicLab.Common;
     
    149150
    150151    #region Persistence Properties
     152    [Storable]
     153    private Guid UserId;
     154
    151155    [Storable(Name = "AlgorithmId")]
    152156    private long StorableAlgorithmId {
     
    186190      runs = cloner.Clone(original.runs);
    187191      storeRunsAutomatically = original.storeRunsAutomatically;
     192      UserId = original.UserId;
    188193      RegisterRunsEvents();
    189194    }
     
    195200      runs = new RunCollection();
    196201      storeRunsAutomatically = true;
     202      UserId = UserInformation.Instance.User.Id;
    197203      RegisterRunsEvents();
    198204    }
     
    381387      foreach (IRun run in e.Items) {
    382388        if (problem != null) {
    383           OKBRun okbRun = new OKBRun(AlgorithmId, problem.ProblemId, run);
     389          OKBRun okbRun = new OKBRun(AlgorithmId, problem.ProblemId, run, UserId);
    384390          runs.Add(okbRun);
    385391          if (StoreRunsAutomatically) {
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs

    r7535 r7554  
    8080
    8181    #region Persistence Properties
     82    [Storable]
     83    private Guid UserId;
     84
    8285    [Storable(Name = "Stored")]
    8386    private bool StorableStored {
     
    110113      createdDate = original.createdDate;
    111114      stored = original.stored;
    112     }
    113     public OKBRun(long algorithmId, long problemId, IRun run)
     115      UserId = original.UserId;
     116    }
     117    public OKBRun(long algorithmId, long problemId, IRun run, Guid userId)
    114118      : base(run) {
    115119      this.algorithmId = algorithmId;
     
    117121      this.createdDate = DateTime.Now;
    118122      this.stored = false;
     123      this.UserId = userId;
    119124    }
    120125
     
    130135      run.ProblemId = problemId;
    131136      //TODO: should there be some error handling? at this point it should already be checked that the user and client are registred
    132       run.UserId = UserInformation.Instance.User.Id;
     137      run.UserId = UserId;
    133138      run.ClientId = ClientInformation.Instance.ClientInfo.Id;
    134139      run.CreatedDate = createdDate;
Note: See TracChangeset for help on using the changeset viewer.