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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.