AvalonStudio.TextEditor.Document.TextSegment.ToDebugString C# (CSharp) Method

ToDebugString() private method

private ToDebugString ( ) : string
return string
		internal string ToDebugString()
		{
			return "[nodeLength=" + nodeLength + " totalNodeLength=" + totalNodeLength
			       + " distanceToMaxEnd=" + distanceToMaxEnd + " MaxEndOffset=" + (StartOffset + distanceToMaxEnd) + "]";
		}
#endif

Usage Example

 private static void AppendTreeToString(TextSegment node, StringBuilder b, int indent)
 {
     if (node.color == RED)
     {
         b.Append("RED   ");
     }
     else
     {
         b.Append("BLACK ");
     }
     b.AppendLine(node + node.ToDebugString());
     indent += 2;
     if (node.left != null)
     {
         b.Append(' ', indent);
         b.Append("L: ");
         AppendTreeToString(node.left, b, indent);
     }
     if (node.right != null)
     {
         b.Append(' ', indent);
         b.Append("R: ");
         AppendTreeToString(node.right, b, indent);
     }
 }