- Timestamp:
- 07/18/14 13:44:53 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Common/3.3/ObjectExtensions.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 38 38 if (obj == null) return Enumerable.Empty<object>(); 39 39 if (excludedMembers == null) excludedMembers = new HashSet<object>(); 40 var fieldInfos = new Dictionary<Type, FieldInfo[]>(); 40 41 41 42 var objects = new HashSet<object>(); … … 47 48 objects.Add(current); 48 49 49 foreach (object o in GetChildObjects(current, excludedMembers, excludeStaticMembers )) {50 foreach (object o in GetChildObjects(current, excludedMembers, excludeStaticMembers, fieldInfos)) { 50 51 if (o == null) continue; 51 52 if (ExcludeType(o.GetType())) continue; … … 80 81 } 81 82 82 private static IEnumerable<object> GetChildObjects(object obj, HashSet<object> excludedMembers, bool excludeStaticMembers ) {83 private static IEnumerable<object> GetChildObjects(object obj, HashSet<object> excludedMembers, bool excludeStaticMembers, Dictionary<Type, FieldInfo[]> fieldInfos) { 83 84 Type type = obj.GetType(); 84 85 … … 111 112 } 112 113 } else { 113 foreach (FieldInfo f in type.GetAllFields()) { 114 if (!fieldInfos.ContainsKey(type)) 115 fieldInfos[type] = type.GetAllFields().ToArray(); 116 foreach (FieldInfo f in fieldInfos[type]) { 114 117 if (excludeStaticMembers && f.IsStatic) continue; 115 118 object fieldValue;
Note: See TracChangeset
for help on using the changeset viewer.