- Timestamp:
- 05/30/08 13:41:27 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/sources/HeuristicLab.PluginInfrastructure/BaseClasses/ApplicationBase.cs
r8 r279 30 30 private Version version; 31 31 private string description; 32 32 private bool autoRestart; 33 33 34 public ApplicationBase() { 34 35 ReadAttributes(); … … 45 46 // after the assertion we are sure that the array access will not fail 46 47 ClassInfoAttribute pluginAttribute = (ClassInfoAttribute)pluginAttributes[0]; 48 if(pluginAttribute != null) { 49 // if the plugin name is not explicitly set in the attribute then the default plugin name is the FullName of the type 50 if(pluginAttribute.Name != null) { 51 this.name = pluginAttribute.Name; 52 } else { 53 this.name = this.GetType().FullName; 54 } 47 55 48 // if the plugin name is not explicitly set in the attribute then the default plugin name is the FullName of the type49 if(pluginAttribute != null && pluginAttribute.Name!= null) {50 this.name = pluginAttribute.Name;51 } else {52 this.name = this.GetType().FullName;53 }56 // if the version is not explicitly set in the attribute then the version of the assembly is used as default 57 if(pluginAttribute.Version != null) { 58 this.version = new Version(pluginAttribute.Version); 59 } else { 60 this.version = this.GetType().Assembly.GetName().Version; 61 } 54 62 55 // if the version is not explicitly set in the attribute then the version of the assemblyis used as default56 if(pluginAttribute != null && pluginAttribute.Version != null) {57 this.version = new Version(pluginAttribute.Version);58 } else {59 this.version = this.GetType().Assembly.GetName().Version;60 }63 // if the description is not explicitly set in the attribute then the name of name of the application is used as default 64 if(pluginAttribute.Description != null) { 65 this.description = pluginAttribute.Description; 66 } else { 67 this.description = name; 68 } 61 69 62 // if the description is not explicitly set in the attribute then the name of name of the application is used as default 63 if(pluginAttribute != null && pluginAttribute.Description != null) { 64 this.description = pluginAttribute.Description; 65 } else { 66 this.description = name; 70 this.autoRestart = pluginAttribute.AutoRestart; 67 71 } 68 72 } … … 83 87 } 84 88 85 public abstract void Run() ; 89 public bool AutoRestart { 90 get { return autoRestart; } 91 } 92 93 public abstract void Run(); 86 94 87 95 #endregion
Note: See TracChangeset
for help on using the changeset viewer.