Ejemplo n.º 1
0
 /// <summary>
 /// Converts an OmniSharp <see cref="Range"/> to a <see cref="TextSpan"/> within a <see cref="SourceText"/>.
 /// </summary>
 public static TextSpan GetSpanFromRange(this SourceText text, Range range)
 => TextSpan.FromBounds(
     start: text.GetPositionFromPoint(range.Start),
     end: text.GetPositionFromPoint(range.End));