Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/26/09 13:44:15 (16 years ago)
Author:
gkronber
Message:

Merged implementation of #471 (OnLoad hook for plugins) (r1228) from CEDMA branch into the trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/BaseClasses/PluginBase.cs

    r1189 r1229  
    3030  /// Default implementation of the IPlugin interface.
    3131  /// </summary>
    32   public class PluginBase : IPlugin {
     32  public abstract class PluginBase : IPlugin {
    3333    private string name;
    3434    private Version version;
     
    4747
    4848      // exactly one attribute of the type ClassInfoAttribute must be given
    49       if(pluginAttributes.Length != 1) {
     49      if (pluginAttributes.Length != 1) {
    5050        throw new InvalidPluginException();
    5151      }
     
    5555
    5656      // 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) {
    5858        this.name = pluginAttribute.Name;
    5959      } else {
     
    6262
    6363      // 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) {
    6565        this.version = new Version(pluginAttribute.Version);
    6666      } else {
     
    6969
    7070      // 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) {
    7272        this.description = pluginAttribute.Description;
    7373      } else {
     
    8181      this.files = new string[fileAttributes.Length];
    8282      int i = 0;
    83       foreach(PluginFileAttribute fileAttr in fileAttributes) {
     83      foreach (PluginFileAttribute fileAttr in fileAttributes) {
    8484        files[i++] = fileAttr.Filename;
    8585      }
     
    121121    }
    122122
    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() { }
    138133
    139134    #endregion
Note: See TracChangeset for help on using the changeset viewer.