Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/ProductDescription.cs @ 2816

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

Worked on plugin deployment GUI.
Added contact info and license text to DB schema.
#860

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.