Changeset 3728 for trunk/sources/HeuristicLab.Core
- Timestamp:
- 05/09/10 01:43:38 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs
r2931 r3728 21 21 22 22 using System; 23 using System.Linq; 24 using System.Reflection; 23 25 using HeuristicLab.Common; 24 26 … … 56 58 else return string.Empty; 57 59 } 60 public static Version GetVersion(Type type) { 61 Assembly assembly = Assembly.GetAssembly(type); 62 AssemblyFileVersionAttribute version = assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true). 63 Cast<AssemblyFileVersionAttribute>().FirstOrDefault(); 64 if (version != null) { 65 return new Version(version.Version); 66 } else { 67 return assembly.GetName().Version; 68 } 69 } 58 70 } 59 71 } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs
r3560 r3728 54 54 get { return ItemAttribute.GetDescription(this.GetType()); } 55 55 } 56 public Version ItemVersion { 57 get { return ItemAttribute.GetVersion(this.GetType()); } 58 } 56 59 public virtual Image ItemImage { 57 60 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemCollection.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs
r3560 r3728 54 54 get { return ItemAttribute.GetDescription(this.GetType()); } 55 55 } 56 public Version ItemVersion { 57 get { return ItemAttribute.GetVersion(this.GetType()); } 58 } 56 59 public virtual Image ItemImage { 57 60 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs
r3560 r3728 54 54 get { return ItemAttribute.GetDescription(this.GetType()); } 55 55 } 56 public Version ItemVersion { 57 get { return ItemAttribute.GetVersion(this.GetType()); } 58 } 56 59 public virtual Image ItemImage { 57 60 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs
r3560 r3728 50 50 get { return ItemAttribute.GetDescription(this.GetType()); } 51 51 } 52 public Version ItemVersion { 53 get { return ItemAttribute.GetVersion(this.GetType()); } 54 } 52 55 public virtual Image ItemImage { 53 56 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs
r3560 r3728 51 51 get { return ItemAttribute.GetDescription(this.GetType()); } 52 52 } 53 public Version ItemVersion { 54 get { return ItemAttribute.GetVersion(this.GetType()); } 55 } 53 56 public virtual Image ItemImage { 54 57 get { return VS2008ImageLibrary.Class; } -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItem.cs
r3500 r3728 31 31 string ItemName { get; } 32 32 string ItemDescription { get; } 33 Version ItemVersion { get; } 33 34 Image ItemImage { get; } 34 35 -
trunk/sources/HeuristicLab.Core/3.3/Item.cs
r3550 r3728 50 50 get { return ItemAttribute.GetDescription(this.GetType()); } 51 51 } 52 public Version ItemVersion { 53 get { return ItemAttribute.GetVersion(this.GetType()); } 54 } 52 55 public virtual Image ItemImage { 53 56 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Class; }
Note: See TracChangeset
for help on using the changeset viewer.