Changeset 6195 for branches/histogram/HeuristicLab.Common
- Timestamp:
- 05/14/11 16:45:46 (13 years ago)
- Location:
- branches/histogram
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
-
branches/histogram/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj
r5837 r6195 121 121 <Compile Include="Content\IStorableContent.cs" /> 122 122 <Compile Include="Constants.cs" /> 123 <Compile Include="ObjectExtensions.cs" /> 123 124 <Compile Include="DeepCloneable.cs" /> 124 125 <Compile Include="Content\IContent.cs" /> -
branches/histogram/HeuristicLab.Common/3.3/HeuristicLabCommonPlugin.cs.frame
r5446 r6195 29 29 /// Plugin class for HeuristicLab.Common plugin. 30 30 /// </summary> 31 [Plugin("HeuristicLab.Common", "3.3. 3.$WCREV$")]31 [Plugin("HeuristicLab.Common", "3.3.4.$WCREV$")] 32 32 [PluginFile("HeuristicLab.Common-3.3.dll", PluginFileType.Assembly)] 33 33 public class HeuristicLabCommonPlugin : PluginBase { -
branches/histogram/HeuristicLab.Common/3.3/Properties/AssemblyInfo.frame
r5446 r6195 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3. 3.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.4.$WCREV$")] -
branches/histogram/HeuristicLab.Common/3.3/TypeExtensions.cs
r5445 r6195 21 21 22 22 using System; 23 using System.Collections.Generic; 24 using System.Reflection; 23 25 using System.Text; 24 26 … … 45 47 return sb.ToString(); 46 48 } 49 50 public static IEnumerable<FieldInfo> GetAllFields(this Type type) { 51 foreach (var field in type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) 52 yield return field; 53 54 foreach (var field in type.GetFields(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)) 55 yield return field; 56 57 if (type.BaseType != null) { 58 foreach (var field in type.BaseType.GetAllFields()) 59 yield return field; 60 } 61 } 62 63 // http://stackoverflow.com/questions/457676/c-reflection-check-if-a-class-is-derived-from-a-generic-class 64 public static bool IsSubclassOfRawGeneric(this Type toCheck, Type generic) { 65 while (toCheck != typeof(object)) { 66 var cur = toCheck.IsGenericType ? toCheck.GetGenericTypeDefinition() : toCheck; 67 if (generic == cur) { 68 return true; 69 } 70 toCheck = toCheck.BaseType; // baseType is null when toCheck is an Interface 71 if (toCheck == null) 72 return false; 73 } 74 return false; 75 } 47 76 } 48 77 }
Note: See TracChangeset
for help on using the changeset viewer.