Esempio n. 1
0
        private void RefreshHeapshotUIObjects()
        {
            this.hsRoots.Clear();
            this.hsAllObjects.Clear();
            foreach (HeapshotReader.ReferenceInfo info in this.heapshotReader.Roots)
            {
                string name = info.fieldInfo.name;
                this.hsRoots.Add(new HeapshotUIObject(name, info.referencedObject, false));
            }
            SortedDictionary <string, List <HeapshotReader.ObjectInfo> > dictionary = new SortedDictionary <string, List <HeapshotReader.ObjectInfo> >();

            foreach (HeapshotReader.ObjectInfo info2 in this.heapshotReader.Objects)
            {
                if (info2.type == HeapshotReader.ObjectType.Managed)
                {
                    string key = info2.typeInfo.name;
                    if (!dictionary.ContainsKey(key))
                    {
                        dictionary.Add(key, new List <HeapshotReader.ObjectInfo>());
                    }
                    dictionary[key].Add(info2);
                }
            }
            foreach (KeyValuePair <string, List <HeapshotReader.ObjectInfo> > pair in dictionary)
            {
                HeapshotReader.ObjectInfo refObject = new HeapshotReader.ObjectInfo();
                HeapshotReader.FieldInfo  field     = new HeapshotReader.FieldInfo("(Unknown)");
                foreach (HeapshotReader.ObjectInfo info5 in pair.Value)
                {
                    refObject.references.Add(new HeapshotReader.ReferenceInfo(info5, field));
                }
                HeapshotUIObject item = new HeapshotUIObject(pair.Key + " x " + pair.Value.Count, refObject, false)
                {
                    IsDummyObject = true
                };
                this.hsAllObjects.Add(item);
            }
        }
Esempio n. 2
0
 private void RefreshHeapshotUIObjects()
 {
     this.hsRoots.Clear();
     this.hsAllObjects.Clear();
     foreach (HeapshotReader.ReferenceInfo info in this.heapshotReader.Roots)
     {
         string name = info.fieldInfo.name;
         this.hsRoots.Add(new HeapshotUIObject(name, info.referencedObject, false));
     }
     SortedDictionary<string, List<HeapshotReader.ObjectInfo>> dictionary = new SortedDictionary<string, List<HeapshotReader.ObjectInfo>>();
     foreach (HeapshotReader.ObjectInfo info2 in this.heapshotReader.Objects)
     {
         if (info2.type == HeapshotReader.ObjectType.Managed)
         {
             string key = info2.typeInfo.name;
             if (!dictionary.ContainsKey(key))
             {
                 dictionary.Add(key, new List<HeapshotReader.ObjectInfo>());
             }
             dictionary[key].Add(info2);
         }
     }
     foreach (KeyValuePair<string, List<HeapshotReader.ObjectInfo>> pair in dictionary)
     {
         HeapshotReader.ObjectInfo refObject = new HeapshotReader.ObjectInfo();
         HeapshotReader.FieldInfo field = new HeapshotReader.FieldInfo("(Unknown)");
         foreach (HeapshotReader.ObjectInfo info5 in pair.Value)
         {
             refObject.references.Add(new HeapshotReader.ReferenceInfo(info5, field));
         }
         HeapshotUIObject item = new HeapshotUIObject(pair.Key + " x " + pair.Value.Count, refObject, false) {
             IsDummyObject = true
         };
         this.hsAllObjects.Add(item);
     }
 }
Esempio n. 3
0
 private void OnSelectObject(HeapshotUIObject o)
 {
     this.hsBackTraceObjects.Clear();
     this.hsBackTraceObjects.Add(new HeapshotUIObject(o.Name, o.ObjectInfo, true));
 }
Esempio n. 4
0
 private void OnSelectObject(HeapshotUIObject o)
 {
     this.hsBackTraceObjects.Clear();
     this.hsBackTraceObjects.Add(new HeapshotUIObject(o.Name, o.ObjectInfo, true));
 }