Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/07/11 12:56:21 (14 years ago)
Author:
ascheibe
Message:

#1233

  • added missing partial classes for dtos
  • simplified dtos in Services.Hive.Common
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Appointment.cs

    r5599 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    4039    public Guid ResourceId { get; set; }
    4140
    42     protected Appointment(Appointment original, Cloner cloner)
    43       : base(original, cloner) {
    44       this.AllDayEvent = original.AllDayEvent;
    45       this.EndDate = original.EndDate;
    46       this.Recurring = original.Recurring;
    47       this.RecurringId = original.RecurringId;
    48       this.ResourceId = original.ResourceId;
    49       this.StartDate = original.StartDate;
    50     }
    51     public override IDeepCloneable Clone(Cloner cloner) {
    52       return new Appointment(this, cloner);
    53     }
     41
    5442  }
    5543}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveExperiment.cs

    r5511 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    4039
    4140    public HiveExperiment() { }
    42     protected HiveExperiment(HiveExperiment original, Cloner cloner) : base(original, cloner) {
    43       this.RootJobId = original.RootJobId;
    44       this.OwnerUserId = original.OwnerUserId;
    45       this.DateCreated = original.DateCreated;
    46       this.ResourceNames = original.ResourceNames;
    47       this.LastAccessed = original.LastAccessed;
    48     }
    49     public override IDeepCloneable Clone(Cloner cloner) {
    50       return new HiveExperiment(this, cloner);
    51     }
     41
    5242
    5343    public override string ToString() {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveExperimentPermission.cs

    r5511 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
    2726  [DataContract]
    2827  [Serializable]
    29   public class HiveExperimentPermission : HiveItemBase {
     28  public class HiveExperimentPermission {
    3029    [DataMember]
    3130    public Guid HiveExperimentId { get; set; }
     
    3938    public HiveExperimentPermission() { }
    4039
    41     protected HiveExperimentPermission(HiveExperimentPermission original, Cloner cloner) : base(original, cloner) {
    42       this.HiveExperimentId = original.HiveExperimentId;
    43       this.GrantedUserId = original.GrantedUserId;
    44       this.GrantedByUserId = original.GrantedByUserId;
    45       this.Permission = original.Permission;
    46     }
    47     public override IDeepCloneable Clone(Cloner cloner) {
    48       return new HiveExperimentPermission(this, cloner);
    49     }
     40
    5041  }
    5142}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveItem.cs

    r4796 r5614  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    52using System.Runtime.Serialization;
    6 using HeuristicLab.Common;
    7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    83
    94namespace HeuristicLab.Services.Hive.Common.DataTransfer {
    105  [DataContract]
    116  [Serializable]
    12   public abstract class HiveItem : HiveItemBase {
     7  public abstract class HiveItem {
    138    [DataMember]
    149    public Guid Id { get; set; }
    1510
    1611    public HiveItem() { }
    17     protected HiveItem(HiveItem original, Cloner cloner) : base(original, cloner) {
    18       this.Id = original.Id;
    19     }
     12
    2013  }
    2114}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Job.cs

    r5526 r5614  
    2323using System.Collections.Generic;
    2424using System.Runtime.Serialization;
    25 using HeuristicLab.Common;
    2625
    2726namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    4342    [DataMember]
    4443    public bool FinishWhenChildJobsFinished { get; set; }
    45    
     44
    4645    public Job() {
    4746      this.PluginsNeededIds = new List<Guid>();
    4847    }
    49     protected Job(Job original, Cloner cloner) : base(original, cloner) {
    50       this.Priority = original.Priority;
    51       this.CoresNeeded = original.CoresNeeded;
    52       this.MemoryNeeded = original.MemoryNeeded;
    53       this.PluginsNeededIds = new List<Guid>(original.PluginsNeededIds);
    54       this.LastHeartbeat = original.LastHeartbeat;
    55       this.IsParentJob = original.IsParentJob;
    56       this.FinishWhenChildJobsFinished = original.FinishWhenChildJobsFinished;
    57     }
    58     public override IDeepCloneable Clone(Cloner cloner) {
    59       return new Job(this, cloner);
    60     }
     48
    6149
    6250    public override string ToString() {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/JobData.cs

    r5106 r5614  
    2121
    2222using System;
    23 using System.IO;
    2423using System.Runtime.Serialization;
    25 using HeuristicLab.Common;
    2624
    2725namespace HeuristicLab.Services.Hive.Common.DataTransfer {
    2826  [DataContract]
    2927  [Serializable]
    30   public class JobData : HiveItemBase {
     28  public class JobData {
    3129    [DataMember]
    3230    public Guid JobId { get; set; }
     
    3735
    3836    public JobData() { }
    39     protected JobData(JobData original, Cloner cloner) : base(original, cloner) {
    40       if (original.Data != null) this.Data = new byte[original.Data.Length]; Array.Copy(original.Data, this.Data, original.Data.Length);
    41       this.LastUpdate = original.LastUpdate;
    42     }
    43     public override IDeepCloneable Clone(Cloner cloner) {
    44       return new JobData(this, cloner);
    45     }
     37
    4638  }
    4739}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/LightweightJob.cs

    r5526 r5614  
    2424using System.Linq;
    2525using System.Runtime.Serialization;
    26 using HeuristicLab.Common;
    2726
    2827namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    5453      this.State = job.State;
    5554    }
    56     protected LightweightJob(LightweightJob original, Cloner cloner)
    57       : base(original, cloner) {
    58       this.ExecutionTime = original.ExecutionTime;
    59       this.ParentJobId = original.ParentJobId;
    60       this.StateLog = new List<StateLog>(original.StateLog);
    61       this.State = original.State;
    62     }
    63     public override IDeepCloneable Clone(Cloner cloner) {
    64       return new LightweightJob(this, cloner);
    65     }
     55
    6656
    6757    public void SetState(JobState state) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/NamedHiveItem.cs

    r4796 r5614  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 using System.Runtime.Serialization;
    6 using HeuristicLab.Common;
     1using System.Runtime.Serialization;
    72
    83namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    1510
    1611    protected NamedHiveItem() { }
    17     protected NamedHiveItem(NamedHiveItem original, Cloner cloner) : base(original, cloner) {
    18       this.Name = original.Name;
    19       this.Description = original.Description;
    20     }
     12
    2113  }
    2214}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Plugin.cs

    r5402 r5614  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    2523using System.Runtime.Serialization;
    26 using HeuristicLab.Common;
    2724
    2825namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    4340
    4441    public Plugin() { }
    45     protected Plugin(Plugin original, Cloner cloner) : base(original, cloner) {
    46       this.Version = original.Version;
    47       this.UserId = original.UserId;
    48       this.DateCreated = original.DateCreated;
    49       this.IsLocal = original.IsLocal;
    50     }
    51     public override IDeepCloneable Clone(Cloner cloner) {
    52       return new Plugin(this, cloner);
    53     }
     42
     43
    5444  }
    5545}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/PluginData.cs

    r5402 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    3635
    3736    public PluginData() { }
    38     protected PluginData(PluginData original, Cloner cloner)
    39       : base(original, cloner) {
    40       if (original.Data != null)
    41         this.Data = new byte[original.Data.Length];
    42       Array.Copy(original.Data, this.Data, original.Data.Length);
    43       this.FileName = original.FileName;
    44       this.PluginId = original.PluginId;
    45     }
    46     public override IDeepCloneable Clone(Cloner cloner) {
    47       return new PluginData(this, cloner);
    48     }
     37
     38
    4939  }
    5040}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Resource.cs

    r5106 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    3231
    3332    public Resource() { }
    34     protected Resource(Resource original, Cloner cloner) : base(original, cloner) {
    35       this.ParentResourceId = original.ParentResourceId;
    36     }
    37     public override IDeepCloneable Clone(Cloner cloner) {
    38       return new Resource(this, cloner);
    39     }
     33
    4034  }
    4135}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Slave.cs

    r5405 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    5655      SlaveState = DataTransfer.SlaveState.Idle;
    5756    }
    58     protected Slave(Slave original, Cloner cloner) : base(original, cloner) {
    59       this.Cores = original.Cores;
    60       this.FreeCores = original.FreeCores;
    61       this.CpuSpeed = original.CpuSpeed;
    62       this.Memory = original.Memory;
    63       this.FreeMemory = original.FreeMemory;
    64       this.SlaveState = original.SlaveState;
    65       this.IsAllowedToCalculate = original.IsAllowedToCalculate;
    66       this.OperatingSystem = original.OperatingSystem;
    67       this.CpuArchitecture = original.CpuArchitecture;
    68       this.LastHeartbeat = original.LastHeartbeat;
    69     }
    70     public override IDeepCloneable Clone(Cloner cloner) {
    71       return new Slave(this, cloner);
    72     }
    7357
    7458    public override string ToString() {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/SlaveGroup.cs

    r5106 r5614  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using System.Runtime.Serialization;
    25 using System;
    26 using HeuristicLab.Common;
    2723
    2824namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    3026  public class SlaveGroup : Resource {
    3127    public SlaveGroup() { }
    32     protected SlaveGroup(SlaveGroup original, Cloner cloner) : base(original, cloner) { }
    33     public override IDeepCloneable Clone(Cloner cloner) {
    34       return new SlaveGroup(this, cloner);
    35     }
    3628  }
    3729}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/StateLog.cs

    r5511 r5614  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    4342    public StateLog() { }
    4443
    45     protected StateLog(StateLog original, Cloner cloner) : base(original, cloner) {
    46       this.DateTime = original.DateTime;
    47       this.UserId = original.UserId;
    48       this.SlaveId = original.SlaveId;
    49       this.Exception = original.Exception;
    50       this.State = original.State;
    51       this.JobId = original.JobId;
    52     }
    53     public override IDeepCloneable Clone(Cloner cloner) {
    54       return new StateLog(this, cloner);
    55     }
    5644  }
    5745}
Note: See TracChangeset for help on using the changeset viewer.