Last change
on this file since 4170 was
4170,
checked in by cneumuel, 14 years ago
|
refactoring of Result-Polling of HiveExperiment, polling is now much faster and code is cleaner (1092#)
|
File size:
999 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Common;
|
---|
6 | using HeuristicLab.Collections;
|
---|
7 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
8 |
|
---|
9 | namespace HeuristicLab.Hive.Contracts.BusinessObjects {
|
---|
10 | public class JobResultList : ObservableList<JobResult>, IDeepCloneable {
|
---|
11 | public JobResultList() { }
|
---|
12 | public JobResultList(IEnumerable<JobResult> collection) {
|
---|
13 | this.list = new List<JobResult>(collection);
|
---|
14 | }
|
---|
15 |
|
---|
16 | [StorableConstructor]
|
---|
17 | protected JobResultList(bool deserializing) : base(deserializing) { }
|
---|
18 |
|
---|
19 | public object Clone() {
|
---|
20 | return Clone(new Cloner());
|
---|
21 | }
|
---|
22 |
|
---|
23 | public virtual IDeepCloneable Clone(Cloner cloner) {
|
---|
24 | JobResultList clone = (JobResultList)Activator.CreateInstance(this.GetType());
|
---|
25 | cloner.RegisterClonedObject(this, clone);
|
---|
26 | clone.list = (this.Select(x => (JobResult)cloner.Clone(x))).ToList();
|
---|
27 | return clone;
|
---|
28 | }
|
---|
29 | }
|
---|
30 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.