ReferenceCount() public method

public ReferenceCount ( ) : int
return int
Beispiel #1
0
 protected override void DrawData(Rect rect, MemoryElement memoryElement, int indent, int row, bool selected)
 {
     if (Event.current.type == EventType.Repaint)
     {
         string name = memoryElement.name;
         if ((memoryElement.ChildCount() > 0) && (indent < 3))
         {
             name = name + " (" + memoryElement.AccumulatedChildCount().ToString() + ")";
         }
         int index = 0;
         rect.xMax = base.m_Splitter.realSizes[index];
         MemoryTreeList.styles.numberLabel.Draw(rect, name, false, false, false, selected);
         rect.x     = rect.xMax;
         rect.width = base.m_Splitter.realSizes[++index] - 4f;
         MemoryTreeList.styles.numberLabel.Draw(rect, EditorUtility.FormatBytes(memoryElement.totalMemory), false, false, false, selected);
         rect.x    += base.m_Splitter.realSizes[index++];
         rect.width = base.m_Splitter.realSizes[index] - 4f;
         if (memoryElement.ReferenceCount() > 0)
         {
             MemoryTreeList.styles.numberLabel.Draw(rect, memoryElement.ReferenceCount().ToString(), false, false, false, selected);
         }
         else if (selected)
         {
             MemoryTreeList.styles.numberLabel.Draw(rect, string.Empty, false, false, false, selected);
         }
     }
 }
Beispiel #2
0
        protected override void DrawData(Rect rect, MemoryElement memoryElement, int indent, int row, bool selected)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            string displayName = memoryElement.name;

            if (memoryElement.ChildCount() > 0 && indent < 3)
            {
                displayName += " (" + memoryElement.AccumulatedChildCount() + ")";
            }

            int currentColumn = 0;

            rect.xMax = m_Splitter.realSizes[currentColumn];
            styles.numberLabel.Draw(rect, displayName, false, false, false, selected);
            rect.x     = rect.xMax;
            rect.width = m_Splitter.realSizes[++currentColumn] - kSmallMargin;
            styles.numberLabel.Draw(rect, EditorUtility.FormatBytes(memoryElement.totalMemory), false, false, false, selected);
            rect.x    += m_Splitter.realSizes[currentColumn++];
            rect.width = m_Splitter.realSizes[currentColumn] - kSmallMargin;

            if (memoryElement.ReferenceCount() > 0)
            {
                styles.numberLabel.Draw(rect, memoryElement.ReferenceCount().ToString(), false, false, false, selected);
            }
            else if (selected)
            {
                styles.numberLabel.Draw(rect, "", false, false, false, selected);
            }
        }
Beispiel #3
0
 protected override void DrawData(Rect rect, MemoryElement memoryElement, int indent, int row, bool selected)
 {
     if (Event.current.type == EventType.Repaint)
     {
         string text = memoryElement.name;
         if (memoryElement.ChildCount() > 0 && indent < 3)
         {
             text = text + " (" + memoryElement.AccumulatedChildCount().ToString() + ")";
         }
         int num = 0;
         rect.xMax = (float)this.m_Splitter.realSizes[num];
         MemoryTreeList.styles.numberLabel.Draw(rect, text, false, false, false, selected);
         rect.x     = rect.xMax;
         rect.width = (float)this.m_Splitter.realSizes[++num] - 4f;
         MemoryTreeList.styles.numberLabel.Draw(rect, EditorUtility.FormatBytes(memoryElement.totalMemory), false, false, false, selected);
         rect.x    += (float)this.m_Splitter.realSizes[num++];
         rect.width = (float)this.m_Splitter.realSizes[num] - 4f;
         if (memoryElement.ReferenceCount() > 0)
         {
             MemoryTreeList.styles.numberLabel.Draw(rect, memoryElement.ReferenceCount().ToString(), false, false, false, selected);
         }
         else if (selected)
         {
             MemoryTreeList.styles.numberLabel.Draw(rect, "", false, false, false, selected);
         }
     }
 }
 protected override void DrawData(Rect rect, MemoryElement memoryElement, int indent, int row, bool selected)
 {
     if (Event.current.type == EventType.Repaint)
     {
         string name = memoryElement.name;
         if ((memoryElement.ChildCount() > 0) && (indent < 3))
         {
             name = name + " (" + memoryElement.AccumulatedChildCount().ToString() + ")";
         }
         int index = 0;
         rect.xMax = base.m_Splitter.realSizes[index];
         MemoryTreeList.styles.numberLabel.Draw(rect, name, false, false, false, selected);
         rect.x = rect.xMax;
         rect.width = base.m_Splitter.realSizes[++index] - 4f;
         MemoryTreeList.styles.numberLabel.Draw(rect, EditorUtility.FormatBytes(memoryElement.totalMemory), false, false, false, selected);
         rect.x += base.m_Splitter.realSizes[index++];
         rect.width = base.m_Splitter.realSizes[index] - 4f;
         if (memoryElement.ReferenceCount() > 0)
         {
             MemoryTreeList.styles.numberLabel.Draw(rect, memoryElement.ReferenceCount().ToString(), false, false, false, selected);
         }
         else if (selected)
         {
             MemoryTreeList.styles.numberLabel.Draw(rect, string.Empty, false, false, false, selected);
         }
     }
 }
        protected override void DrawData(Rect rect, MemoryElement memoryElement, int indent, int row, bool selected)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            string text = memoryElement.name;

            if (memoryElement.ChildCount() > 0 && indent < 3)
            {
                text = text + " (" + memoryElement.AccumulatedChildCount().ToString() + ")";
            }
            int index1 = 0;

            rect.xMax = (float)this.m_Splitter.realSizes[index1];
            MemoryTreeList.styles.numberLabel.Draw(rect, text, false, false, false, selected);
            rect.x = rect.xMax;
            int num1;

            rect.width = (float)this.m_Splitter.realSizes[num1 = index1 + 1] - 4f;
            MemoryTreeList.styles.numberLabel.Draw(rect, EditorUtility.FormatBytes(memoryElement.totalMemory), false, false, false, selected);
            // ISSUE: explicit reference operation
            // ISSUE: variable of a reference type
            Rect& local = @rect;
            // ISSUE: explicit reference operation
            double x = (double)(^ local).x;

            int[]  realSizes = this.m_Splitter.realSizes;
            int    index2    = num1;
            int    num2      = 1;
            int    index3    = index2 + num2;
            double num3      = (double)realSizes[index2];
            double num4      = x + num3;

            // ISSUE: explicit reference operation
            (^ local).x = (float)num4;
            rect.width  = (float)this.m_Splitter.realSizes[index3] - 4f;
            if (memoryElement.ReferenceCount() > 0)
            {
                MemoryTreeList.styles.numberLabel.Draw(rect, memoryElement.ReferenceCount().ToString(), false, false, false, selected);
            }
            else
            {
                if (!selected)
                {
                    return;
                }
                MemoryTreeList.styles.numberLabel.Draw(rect, string.Empty, false, false, false, selected);
            }
        }
 protected override void DrawData(Rect rect, MemoryElement memoryElement, int indent, int row, bool selected)
 {
   if (Event.current.type != EventType.Repaint)
     return;
   string text = memoryElement.name;
   if (memoryElement.ChildCount() > 0 && indent < 3)
     text = text + " (" + memoryElement.AccumulatedChildCount().ToString() + ")";
   int index1 = 0;
   rect.xMax = (float) this.m_Splitter.realSizes[index1];
   MemoryTreeList.styles.numberLabel.Draw(rect, text, false, false, false, selected);
   rect.x = rect.xMax;
   int num1;
   rect.width = (float) this.m_Splitter.realSizes[num1 = index1 + 1] - 4f;
   MemoryTreeList.styles.numberLabel.Draw(rect, EditorUtility.FormatBytes(memoryElement.totalMemory), false, false, false, selected);
   // ISSUE: explicit reference operation
   // ISSUE: variable of a reference type
   Rect& local = @rect;
   // ISSUE: explicit reference operation
   double x = (double) (^local).x;
   int[] realSizes = this.m_Splitter.realSizes;
   int index2 = num1;
   int num2 = 1;
   int index3 = index2 + num2;
   double num3 = (double) realSizes[index2];
   double num4 = x + num3;
   // ISSUE: explicit reference operation
   (^local).x = (float) num4;
   rect.width = (float) this.m_Splitter.realSizes[index3] - 4f;
   if (memoryElement.ReferenceCount() > 0)
   {
     MemoryTreeList.styles.numberLabel.Draw(rect, memoryElement.ReferenceCount().ToString(), false, false, false, selected);
   }
   else
   {
     if (!selected)
       return;
     MemoryTreeList.styles.numberLabel.Draw(rect, string.Empty, false, false, false, selected);
   }
 }