- Timestamp:
- 03/24/15 11:07:36 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NewItemDialog/HeuristicLab.Core/3.3/Attributes/CreatableAttribute.cs
r12012 r12246 36 36 } 37 37 38 public int Priority { get; set; } 39 40 38 41 public CreatableAttribute() { 39 42 Category = "Other Items"; 43 Priority = int.MaxValue; 40 44 } 41 45 public CreatableAttribute(string category) … … 53 57 else return null; 54 58 } 59 60 public static int GetPriority(Type type) { 61 var attribs = type.GetCustomAttributes(typeof(CreatableAttribute), false); 62 if (attribs.Length > 0) return ((CreatableAttribute)attribs[0]).Priority; 63 else return int.MaxValue; 64 } 55 65 } 56 66 }
Note: See TracChangeset
for help on using the changeset viewer.