public static bool Equals(Protocol.Range target, SourceRange source) =>
 (target.Source == null && source == null) ||
 (PathEquals(target.Source.Path, source.Path) &&
  target.Line == source.StartPoint.LineIndex &&
  target.EndLine == source.EndPoint.LineIndex &&
  target.Column == source.StartPoint.CharIndex &&
  target.EndColumn == source.EndPoint.CharIndex);
 public static void Assign(Protocol.Range target, SourceRange source)
 {
     if (source != null)
     {
         target.Source    = new Protocol.Source(source.Path);
         target.Line      = source.StartPoint.LineIndex;
         target.EndLine   = source.EndPoint.LineIndex;
         target.Column    = source.StartPoint.CharIndex;
         target.EndColumn = source.EndPoint.CharIndex;
     }
     else
     {
         target.Source    = null;
         target.Line      = null;
         target.EndLine   = null;
         target.Column    = null;
         target.EndColumn = null;
     }
 }
Пример #3
0
 public static void Assign(Protocol.Range target, string item, string more)
 {
     target.Item = item;
     target.More = more;
 }