Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5614


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
Files:
7 added
1 deleted
25 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/Administration/HiveAppointment.cs

    r5538 r5614  
    2323using System.Drawing;
    2424using System.Xml.Serialization;
    25 using Calendar;
    2625
    2726namespace HeuristicLab.Clients.Hive.Views.Administration {
    2827
    29   public class HiveAppointment : Appointment {
     28  public class HiveAppointment : Calendar.Appointment {
    3029    private Guid recurringId = Guid.Empty;
    3130
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj

    r5602 r5614  
    142142    <None Include="Properties\AssemblyInfo.cs.frame" />
    143143    <Compile Include="Exceptions\ServiceClientFactoryException.cs" />
     144    <Compile Include="ServiceClients\Appointment.cs" />
     145    <Compile Include="ServiceClients\Heartbeat.cs" />
     146    <Compile Include="ServiceClients\HiveExperimentPermission.cs" />
     147    <Compile Include="ServiceClients\JobData.cs" />
     148    <Compile Include="ServiceClients\Plugin.cs" />
     149    <Compile Include="ServiceClients\PluginData.cs" />
     150    <Compile Include="ServiceClients\Resource.cs" />
    144151    <Compile Include="ServiceClients\StateLog.cs" />
    145152    <Compile Include="ServiceClients\HiveExperiment.cs" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveExperiment.cs

    r5602 r5614  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
     22using HeuristicLab.Common;
    2323
    2424namespace HeuristicLab.Clients.Hive {
    2525
    26   [Item("HiveExperiment", "A Hive Experiment.")]
    27   public partial class HiveExperiment {
     26  public partial class HiveExperiment : IDeepCloneable, IContent {
    2827
    2928    public HiveExperiment() { }
    3029
     30    protected HiveExperiment(HiveExperiment original, Cloner cloner) {
     31      this.RootJobId = original.RootJobId;
     32      this.OwnerUserId = original.OwnerUserId;
     33      this.DateCreated = original.DateCreated;
     34      this.ResourceNames = original.ResourceNames;
     35      this.LastAccessed = original.LastAccessed;
     36      this.Name = original.Name;
     37      this.Description = original.Description;
     38      this.Id = original.Id;
     39    }
     40    public IDeepCloneable Clone(Cloner cloner) {
     41      return new HiveExperiment(this, cloner);
     42    }
     43
     44    public override string ToString() {
     45      return base.ToString() + "Name: " + Name + ", Description: " + Description;
     46    }
     47
     48    public object Clone() {
     49      return Clone(new Cloner());
     50    }
    3151  }
    3252}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs

    r5602 r5614  
    1414    using System;
    1515   
    16    
    17     [System.Diagnostics.DebuggerStepThroughAttribute()]
    18     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    19     [System.Runtime.Serialization.DataContractAttribute(Name="HiveItemBase", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
    20         "nsfer")]
    21     [System.SerializableAttribute()]
    22     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.JobData))]
    23     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveItem))]
    24     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.LightweightJob))]
    25     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.StateLog))]
    26     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Job))]
    27     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))]
    28     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.NamedHiveItem))]
    29     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperiment))]
    30     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
    31     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))]
    32     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))]
    33     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]
    34     public partial class HiveItemBase : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
    35     {
    36        
    37         [System.NonSerializedAttribute()]
    38         private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
    39        
    40         public System.Runtime.Serialization.ExtensionDataObject ExtensionData
    41         {
    42             get
    43             {
    44                 return this.extensionDataField;
    45             }
    46             set
    47             {
    48                 this.extensionDataField = value;
    49             }
    50         }
    51        
    52         public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
    53        
    54         protected void RaisePropertyChanged(string propertyName)
    55         {
    56             System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
    57             if ((propertyChanged != null))
    58             {
    59                 propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
    60             }
    61         }
    62     }
    63    
    64     [System.Diagnostics.DebuggerStepThroughAttribute()]
    65     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    66     [System.Runtime.Serialization.DataContractAttribute(Name="JobData", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
    67         "nsfer")]
    68     [System.SerializableAttribute()]
    69     public partial class JobData : HeuristicLab.Clients.Hive.HiveItemBase
    70     {
    71        
    72         [System.Runtime.Serialization.OptionalFieldAttribute()]
    73         private byte[] DataField;
    74        
    75         [System.Runtime.Serialization.OptionalFieldAttribute()]
    76         private System.Guid JobIdField;
    77        
    78         [System.Runtime.Serialization.OptionalFieldAttribute()]
    79         private System.DateTime LastUpdateField;
    80        
    81         [System.Runtime.Serialization.DataMemberAttribute()]
    82         public byte[] Data
    83         {
    84             get
    85             {
    86                 return this.DataField;
    87             }
    88             set
    89             {
    90                 if ((object.ReferenceEquals(this.DataField, value) != true))
    91                 {
    92                     this.DataField = value;
    93                     this.RaisePropertyChanged("Data");
    94                 }
    95             }
    96         }
    97        
    98         [System.Runtime.Serialization.DataMemberAttribute()]
    99         public System.Guid JobId
    100         {
    101             get
    102             {
    103                 return this.JobIdField;
    104             }
    105             set
    106             {
    107                 if ((this.JobIdField.Equals(value) != true))
    108                 {
    109                     this.JobIdField = value;
    110                     this.RaisePropertyChanged("JobId");
    111                 }
    112             }
    113         }
    114        
    115         [System.Runtime.Serialization.DataMemberAttribute()]
    116         public System.DateTime LastUpdate
    117         {
    118             get
    119             {
    120                 return this.LastUpdateField;
    121             }
    122             set
    123             {
    124                 if ((this.LastUpdateField.Equals(value) != true))
    125                 {
    126                     this.LastUpdateField = value;
    127                     this.RaisePropertyChanged("LastUpdate");
    128                 }
    129             }
    130         }
    131     }
    13216   
    13317    [System.Diagnostics.DebuggerStepThroughAttribute()]
     
    14630    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))]
    14731    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]
    148     public partial class HiveItem : HeuristicLab.Clients.Hive.HiveItemBase
    149     {
     32    public partial class HiveItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
     33    {
     34       
     35        [System.NonSerializedAttribute()]
     36        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
    15037       
    15138        [System.Runtime.Serialization.OptionalFieldAttribute()]
    15239        private System.Guid IdField;
     40       
     41        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
     42        {
     43            get
     44            {
     45                return this.extensionDataField;
     46            }
     47            set
     48            {
     49                this.extensionDataField = value;
     50            }
     51        }
    15352       
    15453        [System.Runtime.Serialization.DataMemberAttribute()]
     
    16665                    this.RaisePropertyChanged("Id");
    16766                }
     67            }
     68        }
     69       
     70        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
     71       
     72        protected void RaisePropertyChanged(string propertyName)
     73        {
     74            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
     75            if ((propertyChanged != null))
     76            {
     77                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
    16878            }
    16979        }
     
    11631073        [System.Runtime.Serialization.EnumMemberAttribute()]
    11641074        Offline = 2,
     1075    }
     1076   
     1077    [System.Diagnostics.DebuggerStepThroughAttribute()]
     1078    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
     1079    [System.Runtime.Serialization.DataContractAttribute(Name="JobData", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
     1080        "nsfer")]
     1081    [System.SerializableAttribute()]
     1082    public partial class JobData : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
     1083    {
     1084       
     1085        [System.NonSerializedAttribute()]
     1086        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
     1087       
     1088        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1089        private byte[] DataField;
     1090       
     1091        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1092        private System.Guid JobIdField;
     1093       
     1094        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1095        private System.DateTime LastUpdateField;
     1096       
     1097        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
     1098        {
     1099            get
     1100            {
     1101                return this.extensionDataField;
     1102            }
     1103            set
     1104            {
     1105                this.extensionDataField = value;
     1106            }
     1107        }
     1108       
     1109        [System.Runtime.Serialization.DataMemberAttribute()]
     1110        public byte[] Data
     1111        {
     1112            get
     1113            {
     1114                return this.DataField;
     1115            }
     1116            set
     1117            {
     1118                if ((object.ReferenceEquals(this.DataField, value) != true))
     1119                {
     1120                    this.DataField = value;
     1121                    this.RaisePropertyChanged("Data");
     1122                }
     1123            }
     1124        }
     1125       
     1126        [System.Runtime.Serialization.DataMemberAttribute()]
     1127        public System.Guid JobId
     1128        {
     1129            get
     1130            {
     1131                return this.JobIdField;
     1132            }
     1133            set
     1134            {
     1135                if ((this.JobIdField.Equals(value) != true))
     1136                {
     1137                    this.JobIdField = value;
     1138                    this.RaisePropertyChanged("JobId");
     1139                }
     1140            }
     1141        }
     1142       
     1143        [System.Runtime.Serialization.DataMemberAttribute()]
     1144        public System.DateTime LastUpdate
     1145        {
     1146            get
     1147            {
     1148                return this.LastUpdateField;
     1149            }
     1150            set
     1151            {
     1152                if ((this.LastUpdateField.Equals(value) != true))
     1153                {
     1154                    this.LastUpdateField = value;
     1155                    this.RaisePropertyChanged("LastUpdate");
     1156                }
     1157            }
     1158        }
     1159       
     1160        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
     1161       
     1162        protected void RaisePropertyChanged(string propertyName)
     1163        {
     1164            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
     1165            if ((propertyChanged != null))
     1166            {
     1167                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
     1168            }
     1169        }
    11651170    }
    11661171   
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Job.cs

    r5602 r5614  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Common;
    25 using HeuristicLab.Core;
    2625
    2726namespace HeuristicLab.Clients.Hive {
    2827
    29   [Item("Job", "A Hive job.")]
    30   public partial class Job : IDeepCloneable {
     28  public partial class Job : LightweightJob {
    3129
    3230    public Job() { }
     
    7068    }
    7169
    72 
     70    public override string ToString() {
     71      return string.Format("State: {0}, SlaveId: {1}, DateCreated: {2}, DateCalculated: {3}, CoresNeeded: {4}, MemoryNeeded: {5}", State, CurrentStateLog.SlaveId, DateCreated, CoresNeeded, MemoryNeeded);
     72    }
    7373  }
    7474}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/LightweightJob.cs

    r5602 r5614  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using HeuristicLab.Core;
     25using HeuristicLab.Common;
    2626
    2727namespace HeuristicLab.Clients.Hive {
    2828
    29   [Item("LightweightJob", "A lightweight Hive job.")]
    30   public partial class LightweightJob {
     29  public partial class LightweightJob : IDeepCloneable, IContent {
    3130
    3231    public LightweightJob() {
     
    4039      this.StateLog = new List<StateLog>(job.StateLog);
    4140      this.State = job.State;
     41    }
     42
     43    protected LightweightJob(LightweightJob original, Cloner cloner) {
     44      this.ExecutionTime = original.ExecutionTime;
     45      this.ParentJobId = original.ParentJobId;
     46      this.StateLog = new List<StateLog>(original.StateLog);
     47      this.State = original.State;
     48      this.Id = original.Id;
     49    }
     50    public IDeepCloneable Clone(Cloner cloner) {
     51      return new LightweightJob(this, cloner);
     52    }
     53
     54    public object Clone() {
     55      return Clone(new Cloner());
    4256    }
    4357
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/MessageContainer.cs

    r5599 r5614  
    2626namespace HeuristicLab.Clients.Hive {
    2727  [StorableClass]
    28   public partial class MessageContainer : IDeepCloneable {
     28  public partial class MessageContainer : IDeepCloneable, IContent {
    2929
    3030    protected MessageContainer() { }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Slave.cs

    r5602 r5614  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    2322
     23using HeuristicLab.Common;
    2424namespace HeuristicLab.Clients.Hive {
    2525
    26   [Item("Slave", "A Slave used for calculating jobs.")]
    27   public partial class Slave {
     26  public partial class Slave : IContent, IDeepCloneable {
    2827
    29     public Slave() { }
     28    public Slave() {
     29      SlaveState = SlaveState.Idle;
     30    }
    3031
     32    protected Slave(Slave original, Cloner cloner)
     33      : base(original, cloner) {
     34      this.Cores = original.Cores;
     35      this.FreeCores = original.FreeCores;
     36      this.CpuSpeed = original.CpuSpeed;
     37      this.Memory = original.Memory;
     38      this.FreeMemory = original.FreeMemory;
     39      this.SlaveState = original.SlaveState;
     40      this.IsAllowedToCalculate = original.IsAllowedToCalculate;
     41      this.OperatingSystem = original.OperatingSystem;
     42      this.CpuArchitecture = original.CpuArchitecture;
     43      this.LastHeartbeat = original.LastHeartbeat;
     44    }
     45
     46    public IDeepCloneable Clone(Cloner cloner) {
     47      return new Slave(this, cloner);
     48    }
     49
     50    public override string ToString() {
     51      return string.Format("Cores: {0}, FreeCores: {1}", Cores, FreeCores);
     52    }
     53
     54    public object Clone() {
     55      return Clone(new Cloner());
     56    }
    3157  }
    3258}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/SlaveGroup.cs

    r5602 r5614  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
     22using HeuristicLab.Common;
    2323
    2424namespace HeuristicLab.Clients.Hive {
    2525
    26   [Item("SlaveGroup", "A group of Hive slaves.")]
    27   public partial class SlaveGroup {
     26  public partial class SlaveGroup : IContent, IDeepCloneable {
    2827
    2928    public SlaveGroup() { }
    3029
     30    protected SlaveGroup(SlaveGroup original, Cloner cloner) : base(original, cloner) { }
     31
     32    public IDeepCloneable Clone(Cloner cloner) {
     33      return new SlaveGroup(this, cloner);
     34    }
     35
     36    public object Clone() {
     37      return Clone(new Cloner());
     38    }
    3139  }
    3240}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/StateLog.cs

    r5602 r5614  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
     22using HeuristicLab.Common;
    2323
    2424namespace HeuristicLab.Clients.Hive {
    2525
    26   [Item("StateLog", "An entry in a log containing information for a job.")]
    27   public partial class StateLog {
     26  public partial class StateLog : IContent, IDeepCloneable {
    2827
    2928    public StateLog() { }
    3029
     30    protected StateLog(StateLog original, Cloner cloner) {
     31      this.DateTime = original.DateTime;
     32      this.UserId = original.UserId;
     33      this.SlaveId = original.SlaveId;
     34      this.Exception = original.Exception;
     35      this.State = original.State;
     36      this.JobId = original.JobId;
     37      this.Id = original.Id;
     38    }
     39
     40    public IDeepCloneable Clone(Cloner cloner) {
     41      return new StateLog(this, cloner);
     42    }
     43
     44    public object Clone() {
     45      return Clone(new Cloner());
     46    }
    3147  }
    3248}
  • 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}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj

    r5511 r5614  
    102102    <Compile Include="DataTransfer\HiveExperiment.cs" />
    103103    <Compile Include="DataTransfer\HiveItem.cs" />
    104     <Compile Include="DataTransfer\HiveItemBase.cs" />
    105104    <Compile Include="DataTransfer\Permission.cs" />
    106105    <Compile Include="DataTransfer\PluginData.cs" />
Note: See TracChangeset for help on using the changeset viewer.