[2] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[12012] | 3 | * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
[2] | 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 |
|
---|
| 22 | using System;
|
---|
| 23 |
|
---|
[13389] | 24 | namespace HeuristicLab.PluginInfrastructure {
|
---|
[1189] | 25 | /// <summary>
|
---|
| 26 | /// Class that provides information about an application.
|
---|
| 27 | /// </summary>
|
---|
[2] | 28 | [Serializable]
|
---|
[5652] | 29 | public sealed class ApplicationDescription : IApplicationDescription {
|
---|
[2] | 30 | private string name;
|
---|
| 31 |
|
---|
[1189] | 32 | /// <summary>
|
---|
| 33 | /// Gets or sets the name of the application.
|
---|
| 34 | /// </summary>
|
---|
[2] | 35 | public string Name {
|
---|
| 36 | get { return name; }
|
---|
[2517] | 37 | internal set { name = value; }
|
---|
[2] | 38 | }
|
---|
| 39 | private Version version;
|
---|
| 40 |
|
---|
[1189] | 41 | /// <summary>
|
---|
| 42 | /// Gets or sets the version of the application.
|
---|
| 43 | /// </summary>
|
---|
[13338] | 44 | public Version Version {
|
---|
[2] | 45 | get { return version; }
|
---|
[13338] | 46 | internal set { version = value; }
|
---|
[2] | 47 | }
|
---|
| 48 | private string description;
|
---|
| 49 |
|
---|
[1189] | 50 | /// <summary>
|
---|
| 51 | /// Gets or sets the description of the application.
|
---|
| 52 | /// </summary>
|
---|
[2527] | 53 | public string Description {
|
---|
[2] | 54 | get { return description; }
|
---|
[2527] | 55 | internal set { description = value; }
|
---|
[2] | 56 | }
|
---|
| 57 |
|
---|
[242] | 58 | private bool autoRestart;
|
---|
[1189] | 59 | /// <summary>
|
---|
| 60 | /// Gets or sets the boolean flag if the application should be automatically restarted.
|
---|
| 61 | /// </summary>
|
---|
[13338] | 62 | public bool AutoRestart {
|
---|
[242] | 63 | get { return autoRestart; }
|
---|
[13338] | 64 | internal set { autoRestart = value; }
|
---|
[242] | 65 | }
|
---|
| 66 |
|
---|
[2488] | 67 | private string declaringAssemblyName;
|
---|
[2] | 68 | /// <summary>
|
---|
[1189] | 69 | /// Gets or sets the name of the assembly that contains the IApplication type.
|
---|
[2] | 70 | /// </summary>
|
---|
[13338] | 71 | public string DeclaringAssemblyName {
|
---|
[2488] | 72 | get { return declaringAssemblyName; }
|
---|
[13338] | 73 | internal set { declaringAssemblyName = value; }
|
---|
[2] | 74 | }
|
---|
| 75 |
|
---|
[2488] | 76 | private string declaringTypeName;
|
---|
[2] | 77 | /// <summary>
|
---|
[1189] | 78 | /// Gets or sets the name of the type that implements the interface IApplication.
|
---|
[2] | 79 | /// </summary>
|
---|
[13338] | 80 | public string DeclaringTypeName {
|
---|
[2488] | 81 | get { return declaringTypeName; }
|
---|
[13338] | 82 | internal set { declaringTypeName = value; }
|
---|
[2] | 83 | }
|
---|
[2497] | 84 |
|
---|
| 85 | public override string ToString() {
|
---|
[2922] | 86 | return Name + " " + Version;
|
---|
[2497] | 87 | }
|
---|
[2] | 88 | }
|
---|
| 89 | }
|
---|