Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/09 16:52:52 (15 years ago)
Author:
gkronber
Message:

worked on plugin infrastructure refactoring. #799

Location:
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Attributes
Files:
2 added
4 moved

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Attributes/AssemblyBuildDateAttribute.cs

    r2472 r2475  
    2727namespace HeuristicLab.PluginInfrastructure {
    2828  /// <summary>
    29   /// Attribute of an assembly when it was built.
     29  /// Build date attribute. Allows to declare the build date of assemblies.
    3030  /// </summary>
    3131  [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
     
    3333    private DateTime buildDate;
    3434    /// <summary>
    35     /// Gets or sets the date when the assembly has been built.
     35    /// Gets or sets the build date.
    3636    /// </summary>
    3737    public DateTime BuildDate {
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Attributes/PluginDependencyAttribute.cs

    r2472 r2475  
    2626namespace HeuristicLab.PluginInfrastructure {
    2727  /// <summary>
    28   /// This attribute can be used to specify that an assembly depends on a different plugin.
     28  /// This attribute can be used to declare that an plugin depends on a another plugin.
    2929  /// </summary>
    30   [AttributeUsage(AttributeTargets.Class,AllowMultiple=true)]
    31   public sealed class DependencyAttribute : System.Attribute {
     30  [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
     31  public sealed class PluginDependencyAttribute : System.Attribute {
    3232    private string dependency;
    3333
    3434    /// <summary>
    35     /// Gets or sets the name of the plugin that is needed to load the assembly.
     35    /// Gets or sets the name of the plugin that is needed to load a plugin.
    3636    /// </summary>
    3737    public string Dependency {
     
    4141
    4242    /// <summary>
    43     /// Initializes a new instance of <see cref="DependencyAttribute"/>.
     43    /// Initializes a new instance of <see cref="PluginDependencyAttribute"/>.
     44    /// <param name="dependency">The name of the plugin that is needed to load a plugin.</param>
    4445    /// </summary>
    45     public DependencyAttribute() {
     46    public PluginDependencyAttribute(string dependency) {
     47      this.dependency = dependency;
    4648    }
    4749  }
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Attributes/PluginDescriptionAttribute.cs

    r2472 r2475  
    2626namespace HeuristicLab.PluginInfrastructure {
    2727  /// <summary>
    28   /// This attribute can be used to specify meta data for classes.
    29   /// For example to specify name, version and description of applications or plugins.
     28  /// This attribute can be used to specify meta data for plugins.
     29  /// For example to specify name, version and description of plugins.
    3030  /// </summary>
    3131  [AttributeUsage(AttributeTargets.Class)]
    32   public class ClassInfoAttribute : System.Attribute {
     32  public class PluginDescriptionAttribute : System.Attribute {
    3333    private string name;
    3434    /// <summary>
    35     /// Gets or sets the name of the plugin to which the assembly belongs to.
     35    /// Gets or sets the name of the plugin.
    3636    /// </summary>
    3737    public string Name {
     
    5858    }
    5959
    60     private bool autoRestart;
    6160    /// <summary>
    62     /// Gets or sets the boolean flag whether the plugin should be automatically restarted.
     61    /// Initializes a new instance of <see cref="PluginDescriptionAttribute"/>.
     62    /// <param name="name">Name of the plugin</param>
    6363    /// </summary>
    64     public bool AutoRestart {
    65       get { return autoRestart; }
    66       set { autoRestart = value; }
     64    public PluginDescriptionAttribute(string name)
     65      : this(name, "") {
    6766    }
    6867
    6968    /// <summary>
    70     /// Initializes a new instance of <see cref="ClassInfoAttribute"/>.
     69    /// Initializes a new instance of <see cref="PluginDescriptionAttribute"/>.
     70    /// <param name="name">Name of the plugin</param>
     71    /// <param name="description">Description of the plugin</param>
    7172    /// </summary>
    72     public ClassInfoAttribute() {}
     73    public PluginDescriptionAttribute(string name, string description)
     74      : this(name, description, "") {
     75    }
     76
     77    /// <summary>
     78    /// Initializes a new instance of <see cref="PluginDescriptionAttribute"/>.
     79    /// <param name="name">Name of the plugin</param>
     80    /// <param name="description">Description of the plugin</param>
     81    /// <param name="version">Version string of the plugin</param>
     82    /// </summary>
     83    public PluginDescriptionAttribute(string name, string description, string version) {
     84      this.name = name;
     85      this.version = version;
     86      this.description = description;
     87    }
    7388  }
    7489}
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Attributes/PluginFileAttribute.cs

    r2472 r2475  
    3636
    3737  /// <summary>
    38   /// Attribute for plugins providing information about their corresponding files.
     38  /// PluginFileAttribute can be used to declare which files make up an plugin.
     39  /// Multiple files can be associated to an plugin. Each file should be associated to only one plugin.
    3940  /// </summary>
    40   [AttributeUsage(AttributeTargets.Class, AllowMultiple=true)]
     41  [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    4142  public class PluginFileAttribute : System.Attribute {
    4243    private string filename;
     
    6263    /// <summary>
    6364    /// Initializes a new instance of <see cref="PluginFileAttribute"/>.
     65    /// <param name="filename">Name of the file</param>
     66    /// <param name="type">Type of the file (Assembly, Executable, Data, License)</param>
    6467    /// </summary>
    65     public PluginFileAttribute() { }
     68    public PluginFileAttribute(string filename, PluginFileType type) {
     69      this.filename = filename;
     70      this.filetype = type;
     71    }
    6672  }
    6773}
Note: See TracChangeset for help on using the changeset viewer.