SQL Tools Service
Show / Hide Table of Contents
Improve this Doc View Source

Class BufferPosition

Provides details about a position in a file buffer. All positions are expressed in 1-based positions (i.e. the first line and column in the file is position 1,1).

Inheritance
System.Object
BufferPosition
Namespace:Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class BufferPosition

Constructors

| Improve this Doc View Source

BufferPosition(Int32, Int32)

Creates a new instance of the BufferPosition class.

Declaration
public BufferPosition(int line, int column)
Parameters
Type Name Description
System.Int32 line

The line number of the position.

System.Int32 column

The column number of the position.

Fields

| Improve this Doc View Source

None

Provides an instance that represents a position that has not been set.

Declaration
public static readonly BufferPosition None

Properties

| Improve this Doc View Source

Column

Gets the column number of the position in the buffer.

Declaration
public int Column { get; }
Type Description
System.Int32
| Improve this Doc View Source

Line

Gets the line number of the position in the buffer.

Declaration
public int Line { get; }
Type Description
System.Int32

Methods

| Improve this Doc View Source

Equals(Object)

Compares two instances of the BufferPosition class.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to which this instance will be compared.

Returns
Type Description
System.Boolean

True if the positions are equal, false otherwise.

| Improve this Doc View Source

GetHashCode()

Calculates a unique hash code that represents this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code representing this instance.

Operators

| Improve this Doc View Source

GreaterThan(BufferPosition, BufferPosition)

Compares two positions to check if one is greater than the other.

Declaration
public static bool operator>(BufferPosition positionOne, BufferPosition positionTwo)
Parameters
Type Name Description
BufferPosition positionOne

The first position to compare.

BufferPosition positionTwo

The second position to compare.

Returns
Type Description
System.Boolean

True if positionOne is greater than positionTwo.

| Improve this Doc View Source

LessThan(BufferPosition, BufferPosition)

Compares two positions to check if one is less than the other.

Declaration
public static bool operator <(BufferPosition positionOne, BufferPosition positionTwo)
Parameters
Type Name Description
BufferPosition positionOne

The first position to compare.

BufferPosition positionTwo

The second position to compare.

Returns
Type Description
System.Boolean

True if positionOne is less than positionTwo.

  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX