Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.Deployment/3.3/ProductDescription.cs @ 3072

Last change on this file since 3072 was 3072, checked in by gkronber, 14 years ago

Copied projects related to the deployment service from the feature branch. #918 (Integrate deployment service into trunk and HL3.3 solution file)

File size: 1.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Runtime.Serialization;
6
7namespace HeuristicLab.Services.Deployment {
8  [DataContract(Name = "ProductDescription")]
9  public class ProductDescription {
10    [DataMember(Name = "Name")]
11    private string name;
12    public string Name {
13      get { return name; }
14    }
15
16    [DataMember(Name = "Version")]
17    private Version version;
18    public Version Version {
19      get { return version; }
20    }
21
22    [DataMember(Name = "Plugins")]
23    private IEnumerable<PluginDescription> plugins;
24    public IEnumerable<PluginDescription> Plugins {
25      get { return plugins; }
26    }
27
28    public ProductDescription(string name, Version version, IEnumerable<PluginDescription> plugins) {
29      if (string.IsNullOrEmpty(name)) throw new ArgumentException("name is empty");
30      if (version == null || plugins == null) throw new ArgumentNullException();
31      this.name = name;
32      this.version = version;
33      this.plugins = new List<PluginDescription>(plugins).AsReadOnly();
34    }
35
36    public ProductDescription(string name, Version version) : this(name, version, Enumerable.Empty<PluginDescription>()) { }
37  }
38}
Note: See TracBrowser for help on using the repository browser.