Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientGroupDtoList.cs @ 4133

Last change on this file since 4133 was 4133, checked in by cneumuel, 14 years ago
  • Made HiveExperiment storable, so that a running HiveExperiment can be disconnected, stored and later resumed. (#1115)
  • Added Log to each JobItem (#1115)
File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Collections;
6using HeuristicLab.Common;
7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
8
9namespace HeuristicLab.Hive.Contracts.BusinessObjects {
10  public class ClientGroupDtoList : ObservableList<ClientGroupDto>, IDeepCloneable {
11
12    public ClientGroupDtoList() { }
13    public ClientGroupDtoList(IEnumerable<ClientGroupDto> collection) {
14      this.list = new List<ClientGroupDto>(collection);
15    }
16
17    [StorableConstructor]
18    protected ClientGroupDtoList(bool deserializing) : base(deserializing) { }
19
20    public object Clone() {
21      return Clone(new Cloner());
22    }
23
24    public virtual IDeepCloneable Clone(Cloner cloner) {
25      ClientGroupDtoList clone = (ClientGroupDtoList)Activator.CreateInstance(this.GetType());
26      cloner.RegisterClonedObject(this, clone);
27      clone.list = (this.Select(x => (ClientGroupDto)cloner.Clone(x))).ToList();
28      return clone;
29    }
30  }
31}
Note: See TracBrowser for help on using the repository browser.