1 | using System;
|
---|
2 | using HeuristicLab.Common;
|
---|
3 | using HeuristicLab.Core;
|
---|
4 |
|
---|
5 | namespace HeuristicLab.Clients.Hive {
|
---|
6 | public class StateLogItem : Item {
|
---|
7 | public DateTime DateTime { get; set; }
|
---|
8 | public Guid? UserId { get; set; }
|
---|
9 | public Guid? SlaveId { get; set; }
|
---|
10 | public string Exception { get; set; }
|
---|
11 | public JobState State { get; set; }
|
---|
12 | public Guid JobId { get; set; }
|
---|
13 |
|
---|
14 | public StateLogItem() { }
|
---|
15 | public StateLogItem(StateLog stateLog) {
|
---|
16 | this.DateTime = stateLog.DateTime;
|
---|
17 | this.UserId = stateLog.UserId;
|
---|
18 | this.SlaveId = stateLog.SlaveId;
|
---|
19 | this.Exception = stateLog.Exception;
|
---|
20 | this.State = stateLog.State;
|
---|
21 | this.JobId = stateLog.JobId;
|
---|
22 | }
|
---|
23 |
|
---|
24 | protected StateLogItem(StateLogItem original, Cloner cloner)
|
---|
25 | : base(original, cloner) {
|
---|
26 | this.DateTime = original.DateTime;
|
---|
27 | this.UserId = original.UserId;
|
---|
28 | this.SlaveId = original.SlaveId;
|
---|
29 | this.Exception = original.Exception;
|
---|
30 | this.State = original.State;
|
---|
31 | this.JobId = original.JobId;
|
---|
32 | }
|
---|
33 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
34 | return new StateLogItem(this, cloner);
|
---|
35 | }
|
---|
36 |
|
---|
37 | public override string ToString() {
|
---|
38 | return State.ToString();
|
---|
39 | }
|
---|
40 | }
|
---|
41 | }
|
---|