Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResultList.cs @ 4170

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 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Common;
6using HeuristicLab.Collections;
7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
8
9namespace 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.