Changeset 2513 for branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager
- Timestamp:
- 11/19/09 17:47:13 (15 years ago)
- Location:
- branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginDescription.cs
r2504 r2513 40 40 get { return name; } 41 41 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; } 42 51 } 43 52 private Version version; -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginManager.cs
r2504 r2513 44 44 45 45 private List<PluginDescription> plugins; 46 /// <summary> 47 /// Gets all installed plugins. 48 /// </summary> 49 internal IEnumerable<PluginDescription> Plugins { 50 get { return plugins; } 51 } 46 52 47 53 private List<ApplicationDescription> applications; -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginValidator.cs
r2504 r2513 193 193 List<string> pluginFiles = new List<string>(); 194 194 string pluginName = null; 195 string pluginDescription = null; 195 196 // iterate through all custom attributes and search for attributed that we are interested in 196 197 foreach (CustomAttributeData attributeData in attributes) { 197 198 if (IsAttributeDataForType(attributeData, typeof(PluginAttribute))) { 198 199 pluginName = (string)attributeData.ConstructorArguments[0].Value; 200 if (attributeData.ConstructorArguments.Count() == 2) { 201 pluginDescription = (string)attributeData.ConstructorArguments[1].Value; 202 } else pluginDescription = pluginName; 199 203 } else if (IsAttributeDataForType(attributeData, typeof(PluginDependencyAttribute))) { 200 204 pluginDependencies.Add((string)attributeData.ConstructorArguments[0].Value); … … 214 218 215 219 // minimal sanity check of the attribute values 216 if (!string.IsNullOrEmpty(pluginName) && 220 if (!string.IsNullOrEmpty(pluginName) && !string.IsNullOrEmpty(pluginDescription) && 217 221 pluginFiles.Count > 0 && 218 222 pluginAssemblies.Count > 0 && … … 221 225 PluginDescription info = new PluginDescription(); 222 226 info.Name = pluginName; 227 info.Description = pluginDescription; 223 228 info.Version = pluginType.Assembly.GetName().Version; 224 229 info.BuildDate = DateTime.Parse(buildDates.Single(), System.Globalization.CultureInfo.InvariantCulture);
Note: See TracChangeset
for help on using the changeset viewer.