Changeset 14751 for branches/symbreg-factors-2650/HeuristicLab.Core
- Timestamp:
- 03/16/17 07:56:01 (8 years ago)
- Location:
- branches/symbreg-factors-2650
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650
-
branches/symbreg-factors-2650/HeuristicLab.Core
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Core merged: 14656
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs
r14185 r14751 39 39 set { description = value == null ? string.Empty : value; } 40 40 } 41 public bool ExcludeGenericTypeInfo { get; set; } 41 42 42 public ItemAttribute() { 43 Name = string.Empty; 44 Description = string.Empty; 45 } 46 public ItemAttribute(string name, string description) { 43 public ItemAttribute() : this(string.Empty, string.Empty, false) { } 44 public ItemAttribute(string name, string description) : this(name, description, false) { } 45 public ItemAttribute(string name, string description, bool excludeGenericTypeInfo) { 47 46 Name = name; 48 47 Description = description; 48 ExcludeGenericTypeInfo = excludeGenericTypeInfo; 49 49 } 50 50 … … 52 52 object[] attribs = type.GetCustomAttributes(typeof(ItemAttribute), false); 53 53 if (attribs.Length > 0) { 54 string name = ((ItemAttribute)attribs[0]).Name; 55 if (type.IsGenericType) { 54 var attribute = (ItemAttribute)attribs[0]; 55 string name = attribute.Name; 56 if (!attribute.ExcludeGenericTypeInfo && type.IsGenericType) { 56 57 name += "<"; 57 58 Type[] typeParams = type.GetGenericArguments();
Note: See TracChangeset
for help on using the changeset viewer.