Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/09 12:17:30 (15 years ago)
Author:
epitzer
Message:

refactoring/resharping

Location:
branches/New Persistence Exploration/Persistence
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence

    • Property svn:ignore
      •  

        old new  
        22.gitignore
        33*.suo
         4_ReSharper.Persistence
  • branches/New Persistence Exploration/Persistence/Persistence/Util.cs

    r1324 r1329  
    33using System.Text;
    44using System.Reflection;
    5 using System.Collections;
    65
    76namespace Persistence { 
     
    3130      return AutoFormat(o, recursive, visitedObjects);
    3231    }
    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) {
    3433      string s = o as string;
    3534      if (s != null)
     
    4039      if (visitedObjects.ContainsKey(o)) {
    4140        return o.ToString();
    42       } else {
    43         visitedObjects.Add(o, 0);
    44       }     
     41      }
     42      visitedObjects.Add(o, 0);
    4543      if (o.ToString() != o.GetType().ToString()) {
    4644        return o.ToString();
     
    5856          sb.Append("=");         
    5957          if (recursive) {
    60             sb.Append(AutoFormat(((FieldInfo)mInfo).GetValue(o), true, visitedObjects));
     58            sb.Append(AutoFormat(fInfo.GetValue(o), true, visitedObjects));
    6159          } else {
    62             sb.Append(((FieldInfo)mInfo).GetValue(o));
     60            sb.Append(fInfo.GetValue(o));
    6361          }
    6462          sb.Append(", ");
Note: See TracChangeset for help on using the changeset viewer.