Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/09 17:47:13 (15 years ago)
Author:
gkronber
Message:

Worked on command line interface for plugin management. #799

Location:
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginDescription.cs

    r2504 r2513  
    4040      get { return name; }
    4141      internal set { name = value; }
     42    }
     43
     44    private string description;
     45    /// <summary>
     46    /// Gets or sets the description of the plugin.
     47    /// </summary>
     48    public string Description {
     49      get { return description; }
     50      internal set { description = value; }
    4251    }
    4352    private Version version;
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginManager.cs

    r2504 r2513  
    4444
    4545    private List<PluginDescription> plugins;
     46    /// <summary>
     47    /// Gets all installed plugins.
     48    /// </summary>
     49    internal IEnumerable<PluginDescription> Plugins {
     50      get { return plugins; }
     51    }
    4652
    4753    private List<ApplicationDescription> applications;
  • branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginValidator.cs

    r2504 r2513  
    193193      List<string> pluginFiles = new List<string>();
    194194      string pluginName = null;
     195      string pluginDescription = null;
    195196      // iterate through all custom attributes and search for attributed that we are interested in
    196197      foreach (CustomAttributeData attributeData in attributes) {
    197198        if (IsAttributeDataForType(attributeData, typeof(PluginAttribute))) {
    198199          pluginName = (string)attributeData.ConstructorArguments[0].Value;
     200          if (attributeData.ConstructorArguments.Count() == 2) {
     201            pluginDescription = (string)attributeData.ConstructorArguments[1].Value;
     202          } else pluginDescription = pluginName;
    199203        } else if (IsAttributeDataForType(attributeData, typeof(PluginDependencyAttribute))) {
    200204          pluginDependencies.Add((string)attributeData.ConstructorArguments[0].Value);
     
    214218
    215219      // minimal sanity check of the attribute values
    216       if (!string.IsNullOrEmpty(pluginName) &&
     220      if (!string.IsNullOrEmpty(pluginName) && !string.IsNullOrEmpty(pluginDescription) &&
    217221          pluginFiles.Count > 0 &&
    218222          pluginAssemblies.Count > 0 &&
     
    221225        PluginDescription info = new PluginDescription();
    222226        info.Name = pluginName;
     227        info.Description = pluginDescription;
    223228        info.Version = pluginType.Assembly.GetName().Version;
    224229        info.BuildDate = DateTime.Parse(buildDates.Single(), System.Globalization.CultureInfo.InvariantCulture);
Note: See TracChangeset for help on using the changeset viewer.