- Timestamp:
- 02/04/10 12:20:43 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.PluginInfrastructure/Attributes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/Attributes/AssemblyBuildDateAttribute.cs
r2504 r2750 45 45 /// <exception cref="FormatException">Thrown when the time stamp could not be parsed as build date.</exception> 46 46 /// <param name="buildDate">The build date of the assembly.</param> 47 [Obsolete] 47 48 public AssemblyBuildDateAttribute(string buildDate) 48 49 : base() { -
trunk/sources/HeuristicLab.PluginInfrastructure/Attributes/PluginAttribute.cs
r2748 r2750 47 47 } 48 48 49 private Version version; 50 /// <summary> 51 /// Gets the version of the plugin. 52 /// </summary> 53 public Version Version { 54 get { return version; } 55 } 56 57 [Obsolete] 58 public PluginAttribute(string name) : this(name, "0.0.0.0") { } 59 49 60 /// <summary> 50 61 /// Initializes a new instance of <see cref="PluginAttribute"/>. 51 62 /// <param name="name">Name of the plugin</param> 63 /// <param name="version">Version of the plugin</param> 52 64 /// </summary> 53 public PluginAttribute(string name )54 : this(name, string.Empty ) {65 public PluginAttribute(string name, string version) 66 : this(name, string.Empty, version) { 55 67 } 56 68 57 69 /// <summary> 58 70 /// Initializes a new instance of <see cref="PluginAttribute"/>. 71 /// </summary> 59 72 /// <param name="name">Name of the plugin</param> 60 73 /// <param name="description">Description of the plugin</param> 61 /// < /summary>62 public PluginAttribute(string name, string description ) {74 /// <param name="version">Version of the plugin</param> 75 public PluginAttribute(string name, string description, string version) { 63 76 if (string.IsNullOrEmpty(name)) throw new ArgumentException("Plugin name is null or empty."); 64 77 if (description == null) throw new ArgumentNullException("description"); 78 if (string.IsNullOrEmpty(version)) new ArgumentException("Version string is null or empty."); 65 79 this.name = name; 66 80 this.description = description; 81 this.version = new Version(version); // throws format exception if the version string can't be parsed 67 82 } 68 83 } -
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.