Пример #1
0
 internal static Position ToOmnisharpPosition(this ILspFilePosition position)
 {
     return(new Position(position.Line, position.Character));
 }
Пример #2
0
 /// <summary>
 /// Convert a 0-based file position to a 1-based file position.
 /// </summary>
 /// <param name="position">The 0-based file position to convert.</param>
 /// <returns>An equivalent 1-based file position.</returns>
 public static IFilePosition ToFilePosition(this ILspFilePosition position)
 {
     return(new FilePosition((int)position.Line + 1, (int)position.Character + 1));
 }
 internal static Position ToOmnisharpPosition(this ILspFilePosition position) => new(position.Line, position.Character);
Пример #4
0
 public LspFileRange(ILspFilePosition start, ILspFilePosition end)
 {
     Start = start;
     End   = end;
 }
 /// <summary>
 /// Convert a 0-based file position to a 1-based file position.
 /// </summary>
 /// <param name="position">The 0-based file position to convert.</param>
 /// <returns>An equivalent 1-based file position.</returns>
 public static IFilePosition ToFilePosition(this ILspFilePosition position) => new FilePosition(position.Line + 1, position.Character + 1);