Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SlaveGroupDtoList.cs @ 4302

Last change on this file since 4302 was 4302, checked in by cneumuel, 14 years ago
  • made ServerConsole work with wsHttpBinding
  • applied role-base restrictions to all WCF-Services
  • made wcf-services work with certificates
  • renamed ExecutionEngineFacade to ClientFacade

(#1168)

File size: 1.1 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;
8using System.Runtime.Serialization;
9
10namespace HeuristicLab.Hive.Contracts.BusinessObjects {
11  [CollectionDataContract]
12  public class SlaveGroupDtoList : ObservableList<SlaveGroupDto>, IDeepCloneable {
13
14    public SlaveGroupDtoList() { }
15    public SlaveGroupDtoList(IEnumerable<SlaveGroupDto> collection) {
16      this.list = new List<SlaveGroupDto>(collection);
17    }
18
19    [StorableConstructor]
20    protected SlaveGroupDtoList(bool deserializing) : base(deserializing) { }
21
22    public object Clone() {
23      return Clone(new Cloner());
24    }
25
26    public virtual IDeepCloneable Clone(Cloner cloner) {
27      SlaveGroupDtoList clone = (SlaveGroupDtoList)Activator.CreateInstance(this.GetType());
28      cloner.RegisterClonedObject(this, clone);
29      clone.list = (this.Select(x => (SlaveGroupDto)cloner.Clone(x))).ToList();
30      return clone;
31    }
32  }
33}
Note: See TracBrowser for help on using the repository browser.