Changeset 2750 for trunk/sources/HeuristicLab.PluginInfrastructure/Attributes/PluginDependencyAttribute.cs
- Timestamp:
- 02/04/10 12:20:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/Attributes/PluginDependencyAttribute.cs
r2748 r2750 39 39 } 40 40 41 private Version version; 42 /// <summary> 43 /// Gets the version of the plugin dependency. 44 /// </summary> 45 public Version Version { 46 get { return version; } 47 } 48 41 49 /// <summary> 42 50 /// Initializes a new instance of <see cref="PluginDependencyAttribute"/>. 43 51 /// <param name="dependency">The name of the plugin that is needed to load a plugin.</param> 44 52 /// </summary> 45 public PluginDependencyAttribute(string dependency) { 46 if (string.IsNullOrEmpty(dependency)) throw new ArgumentException("Dependency is null or empty.", "dependency"); 53 [Obsolete] 54 public PluginDependencyAttribute(string dependency) 55 : this(dependency, "0.0.0.0") { 56 } 57 58 public PluginDependencyAttribute(string dependency, string version) { 59 if (string.IsNullOrEmpty(dependency)) throw new ArgumentException("Dependency name is null or empty.", "dependency"); 60 if (string.IsNullOrEmpty(version)) throw new ArgumentException("Dependency version is null or empty.", "version"); 47 61 this.dependency = dependency; 62 this.version = new Version(version); // throws format exception if the version string can't be parsed 48 63 } 49 64 }
Note: See TracChangeset
for help on using the changeset viewer.