[2] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[16453] | 3 | * Copyright (C) 2002-2019 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 |
|
---|
[2481] | 24 | namespace HeuristicLab.PluginInfrastructure.Manager {
|
---|
[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>
|
---|
[2504] | 44 | internal Version Version {
|
---|
[2] | 45 | get { return version; }
|
---|
| 46 | set { version = value; }
|
---|
| 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>
|
---|
[2504] | 62 | internal bool AutoRestart {
|
---|
[242] | 63 | get { return autoRestart; }
|
---|
| 64 | set { autoRestart = value; }
|
---|
| 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>
|
---|
[2504] | 71 | internal string DeclaringAssemblyName {
|
---|
[2488] | 72 | get { return declaringAssemblyName; }
|
---|
| 73 | 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>
|
---|
[2504] | 80 | internal string DeclaringTypeName {
|
---|
[2488] | 81 | get { return declaringTypeName; }
|
---|
| 82 | set { declaringTypeName = value; }
|
---|
[2] | 83 | }
|
---|
[2497] | 84 |
|
---|
| 85 | public override string ToString() {
|
---|
[2922] | 86 | return Name + " " + Version;
|
---|
[2497] | 87 | }
|
---|
[2] | 88 | }
|
---|
| 89 | }
|
---|