- Timestamp:
- 07/18/14 12:35:00 (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.dll11 10 HeuristicLab 3.3.5.1.ReSharper.user 12 11 HeuristicLab 3.3.6.0.ReSharper.user 13 12 HeuristicLab.4.5.resharper.user 14 13 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development16 14 HeuristicLab.resharper.user 17 15 ProtoGen.exe … … 19 17 _ReSharper.HeuristicLab 20 18 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests22 19 _ReSharper.HeuristicLab.ExtLibs 23 20 bin 24 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Common/3.3/ObjectExtensions.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 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[]>();41 40 42 41 var objects = new HashSet<object>(); … … 48 47 objects.Add(current); 49 48 50 foreach (object o in GetChildObjects(current, excludedMembers, excludeStaticMembers , fieldInfos)) {49 foreach (object o in GetChildObjects(current, excludedMembers, excludeStaticMembers)) { 51 50 if (o == null) continue; 52 51 if (ExcludeType(o.GetType())) continue; … … 81 80 } 82 81 83 private static IEnumerable<object> GetChildObjects(object obj, HashSet<object> excludedMembers, bool excludeStaticMembers , Dictionary<Type, FieldInfo[]> fieldInfos) {82 private static IEnumerable<object> GetChildObjects(object obj, HashSet<object> excludedMembers, bool excludeStaticMembers) { 84 83 Type type = obj.GetType(); 85 84 … … 112 111 } 113 112 } else { 114 if (!fieldInfos.ContainsKey(type)) 115 fieldInfos[type] = type.GetAllFields().ToArray(); 116 foreach (FieldInfo f in fieldInfos[type]) { 113 foreach (FieldInfo f in type.GetAllFields()) { 117 114 if (excludeStaticMembers && f.IsStatic) continue; 118 115 object fieldValue;
Note: See TracChangeset
for help on using the changeset viewer.