Changeset 1228 for branches/CEDMA-Refactoring-Ticket419/HeuristicLab.PluginInfrastructure/BaseClasses/PluginBase.cs
- Timestamp:
- 02/26/09 13:40:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.PluginInfrastructure/BaseClasses/PluginBase.cs
r8 r1228 30 30 /// Default implementation of the IPlugin interface. 31 31 /// </summary> 32 public class PluginBase : IPlugin {32 public abstract class PluginBase : IPlugin { 33 33 private string name; 34 34 private Version version; … … 44 44 45 45 // exactly one attribute of the type ClassInfoAttribute must be given 46 if (pluginAttributes.Length != 1) {46 if (pluginAttributes.Length != 1) { 47 47 throw new InvalidPluginException(); 48 48 } … … 52 52 53 53 // if the plugin name is not explicitly set in the attribute then the default plugin name is the FullName of the type 54 if (pluginAttribute != null && pluginAttribute.Name != null) {54 if (pluginAttribute != null && pluginAttribute.Name != null) { 55 55 this.name = pluginAttribute.Name; 56 56 } else { … … 59 59 60 60 // if the version is not explicitly set in the attribute then the version of the assembly is used as default 61 if (pluginAttribute != null && pluginAttribute.Version != null) {61 if (pluginAttribute != null && pluginAttribute.Version != null) { 62 62 this.version = new Version(pluginAttribute.Version); 63 63 } else { … … 66 66 67 67 // if the description is not explicitly set in the attribute then the name of name of the plugin is used as default 68 if (pluginAttribute != null && pluginAttribute.Description != null) {68 if (pluginAttribute != null && pluginAttribute.Description != null) { 69 69 this.description = pluginAttribute.Description; 70 70 } else { … … 78 78 this.files = new string[fileAttributes.Length]; 79 79 int i = 0; 80 foreach (PluginFileAttribute fileAttr in fileAttributes) {80 foreach (PluginFileAttribute fileAttr in fileAttributes) { 81 81 files[i++] = fileAttr.Filename; 82 82 } … … 102 102 } 103 103 104 public 104 public string[] Files { 105 105 get { 106 106 return files; … … 108 108 } 109 109 110 public virtual void OnInstall() { 111 } 112 113 public virtual void OnDelete() { 114 } 115 116 public virtual void OnPreUpdate() { 117 } 118 119 public virtual void OnPostUpdate() { 120 } 110 public virtual void OnLoad() { } 111 public virtual void OnInstall() { } 112 public virtual void OnDelete() { } 113 public virtual void OnPreUpdate() { } 114 public virtual void OnPostUpdate() { } 121 115 122 116 #endregion
Note: See TracChangeset
for help on using the changeset viewer.