Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.Deployment/3.3/PluginDescription.cs @ 3158

Last change on this file since 3158 was 3084, checked in by gkronber, 15 years ago

Added deployment service projects to HL 3.3 solution. #918 (Integrate deployment service into trunk and HL3.3 solution file)

File size: 3.0 KB
RevLine 
[3084]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
[2804]23using System.Collections.Generic;
24using System.Linq;
25using System.Text;
26using System.Runtime.Serialization;
27
28namespace HeuristicLab.Services.Deployment {
29  [DataContract(Name = "PluginDescription")]
[2816]30  public class PluginDescription {
[2804]31
32    [DataMember(Name = "Name")]
33    private string name;
34    public string Name {
35      get { return name; }
36    }
37
38    [DataMember(Name = "Version")]
39    private Version version;
40    public Version Version {
41      get { return version; }
42    }
43
[2860]44    [DataMember(Name = "ContactName")]
45    private string contactName;
46    public string ContactName {
47      get { return contactName; }
[2816]48    }
[2804]49
[2860]50    [DataMember(Name = "ContactEmail")]
51    private string contactEmail;
52    public string ContactEmail {
53      get { return contactEmail; }
54    }
55
[2816]56    [DataMember(Name = "LicenseText")]
57    private string licenseText;
58    public string LicenseText {
59      get { return licenseText; }
60    }
61
[2804]62    [DataMember(Name = "Dependencies")]
63    private List<PluginDescription> dependencies;
64    public List<PluginDescription> Dependencies {
65      get { return dependencies; }
66    }
67
[2860]68    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies,
69      string contactName, string contactEmail, string license) {
[2816]70      if (string.IsNullOrEmpty(name)) throw new ArgumentException("name is empty");
[2860]71      if (version == null || dependencies == null ||
72        contactName == null || contactEmail == null ||
73        license == null) throw new ArgumentNullException();
[2804]74      this.name = name;
75      this.version = version;
[2816]76      this.dependencies = new List<PluginDescription>(dependencies);
77      this.licenseText = license;
[2860]78      this.contactName = contactName;
79      this.contactEmail = contactEmail;
[2804]80    }
81
82    public PluginDescription(string name, Version version)
83      : this(name, version, Enumerable.Empty<PluginDescription>()) {
84    }
[2816]85
86    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies)
[2860]87      : this(name, version, dependencies, string.Empty, string.Empty, string.Empty) {
[2816]88    }
[2804]89  }
90}
Note: See TracBrowser for help on using the repository browser.