- Timestamp:
- 02/26/09 13:44:15 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/BaseClasses/PluginBase.cs
r1189 r1229 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; … … 47 47 48 48 // exactly one attribute of the type ClassInfoAttribute must be given 49 if (pluginAttributes.Length != 1) {49 if (pluginAttributes.Length != 1) { 50 50 throw new InvalidPluginException(); 51 51 } … … 55 55 56 56 // if the plugin name is not explicitly set in the attribute then the default plugin name is the FullName of the type 57 if (pluginAttribute != null && pluginAttribute.Name != null) {57 if (pluginAttribute != null && pluginAttribute.Name != null) { 58 58 this.name = pluginAttribute.Name; 59 59 } else { … … 62 62 63 63 // if the version is not explicitly set in the attribute then the version of the assembly is used as default 64 if (pluginAttribute != null && pluginAttribute.Version != null) {64 if (pluginAttribute != null && pluginAttribute.Version != null) { 65 65 this.version = new Version(pluginAttribute.Version); 66 66 } else { … … 69 69 70 70 // if the description is not explicitly set in the attribute then the name of name of the plugin is used as default 71 if (pluginAttribute != null && pluginAttribute.Description != null) {71 if (pluginAttribute != null && pluginAttribute.Description != null) { 72 72 this.description = pluginAttribute.Description; 73 73 } else { … … 81 81 this.files = new string[fileAttributes.Length]; 82 82 int i = 0; 83 foreach (PluginFileAttribute fileAttr in fileAttributes) {83 foreach (PluginFileAttribute fileAttr in fileAttributes) { 84 84 files[i++] = fileAttr.Filename; 85 85 } … … 121 121 } 122 122 123 /// <inheritdoc/> 124 public virtual void OnInstall() { 125 } 126 127 /// <inheritdoc/> 128 public virtual void OnDelete() { 129 } 130 131 /// <inheritdoc/> 132 public virtual void OnPreUpdate() { 133 } 134 135 /// <inheritdoc/> 136 public virtual void OnPostUpdate() { 137 } 123 /// <inhertidoc> 124 public virtual void OnLoad() { } 125 /// <inhertidoc> 126 public virtual void OnInstall() { } 127 /// <inhertidoc> 128 public virtual void OnDelete() { } 129 /// <inhertidoc> 130 public virtual void OnPreUpdate() { } 131 /// <inhertidoc> 132 public virtual void OnPostUpdate() { } 138 133 139 134 #endregion
Note: See TracChangeset
for help on using the changeset viewer.