- Timestamp:
- 03/12/09 12:17:30 (15 years ago)
- Location:
- branches/New Persistence Exploration/Persistence
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New Persistence Exploration/Persistence
- Property svn:ignore
-
old new 2 2 .gitignore 3 3 *.suo 4 _ReSharper.Persistence
-
- Property svn:ignore
-
branches/New Persistence Exploration/Persistence/Persistence/Util.cs
r1324 r1329 3 3 using System.Text; 4 4 using System.Reflection; 5 using System.Collections;6 5 7 6 namespace Persistence { … … 31 30 return AutoFormat(o, recursive, visitedObjects); 32 31 } 33 private static string AutoFormat(object o, bool recursive, Dictionary<object, int> visitedObjects) {32 private static string AutoFormat(object o, bool recursive, IDictionary<object, int> visitedObjects) { 34 33 string s = o as string; 35 34 if (s != null) … … 40 39 if (visitedObjects.ContainsKey(o)) { 41 40 return o.ToString(); 42 } else { 43 visitedObjects.Add(o, 0); 44 } 41 } 42 visitedObjects.Add(o, 0); 45 43 if (o.ToString() != o.GetType().ToString()) { 46 44 return o.ToString(); … … 58 56 sb.Append("="); 59 57 if (recursive) { 60 sb.Append(AutoFormat( ((FieldInfo)mInfo).GetValue(o), true, visitedObjects));58 sb.Append(AutoFormat(fInfo.GetValue(o), true, visitedObjects)); 61 59 } else { 62 sb.Append( ((FieldInfo)mInfo).GetValue(o));60 sb.Append(fInfo.GetValue(o)); 63 61 } 64 62 sb.Append(", ");
Note: See TracChangeset
for help on using the changeset viewer.