public string ToString(bool includeTraceback) { var result = String.Format( "{0} ({1} - {2}) (from {3} to {4} alloc(s))", FormattedBytesDelta, OldBytes, NewBytes, OldCount.GetValueOrDefault(0), NewCount ); if (includeTraceback) { result += Environment.NewLine + Traceback.ToString(); } return(result); }
public override Size Measure(Graphics g) { var sf = RenderParams.StringFormat; var headerText = Allocation.ToString(); var width = (int)Math.Ceiling(g.MeasureString( headerText + Environment.NewLine + Traceback.ToString(), Font, 99999, sf ).Width); var lineHeight = g.MeasureString("AaBbYyZz", Font, width, sf).Height; return(new Size( width, (int)Math.Ceiling(lineHeight * (Traceback.Frames.Count + 1)) )); }