示例#1
0
        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());
        }
示例#2
0
 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);
     }
 }
示例#3
0
 void AddSpan(SpanStart span)
 {
     spans.Add(span);
 }