/// <summary> /// Adds this position to the specified one. /// </summary> public SpanPosition AddTo(SpanPosition other) { var result = new SpanPosition(); if (LineNumber > 1) { result.PositionOnLine += other.PositionOnLine; } else { result.PositionOnLine = PositionOnLine; } result.LineNumber = other.LineNumber + LineNumber - 1; result.AbsolutePosition = other.AbsolutePosition + AbsolutePosition; result.Length = Length; return result; }
private void ValidateSpanContent(string input, string expectedValue, SpanPosition span) { string actualValue = input.Substring(span.AbsolutePosition, span.Length); Assert.AreEqual(expectedValue, actualValue); }
public RwHtmlParsingException(string message, SpanPosition span) : base(message) { this.Span = span; }