Changeset 2513 for branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginValidator.cs
- Timestamp:
- 11/19/09 17:47:13 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.