public string ToString(int indent) { var sb = new StringBuilder(); sb.Indent(indent).AppendLine("Node fix:"); if (SpanStart != null) { sb.Indent(indent + 1).Append("SpanStart = ").AppendLine(SpanStart.ToString()); } if (SpanLength != null) { sb.Indent(indent + 1).Append("SpanLength = ").AppendLine(SpanLength.ToString()); } if (Text != null) { sb.Indent(indent + 1).Append("Text = ").AppendLine(Text); } if (SpanStart == null && SpanLength == null && Text == null) { sb.Indent(indent + 1).AppendLine("(empty)"); } return(sb.ToString()); }
public override int GetHashCode() { unchecked { int result = (Type != null ? Type.GetHashCode() : 0); result = (result * 397) ^ (MomentaneousLocation != null ? MomentaneousLocation.GetHashCode() : 0); result = (result * 397) ^ (SpanStart != null ? SpanStart.GetHashCode() : 0); result = (result * 397) ^ (SpanEnd != null ? SpanEnd.GetHashCode() : 0); return(result); } }
void AddSpan(SpanStart span) { spans.Add(span); }