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

Class BufferRange

Provides details about a range between two positions in a file buffer.

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

Constructors

| Improve this Doc View Source

BufferRange(BufferPosition, BufferPosition)

Creates a new instance of the BufferRange class.

Declaration
public BufferRange(BufferPosition start, BufferPosition end)
Parameters
Type Name Description
BufferPosition start

The start position of the range.

BufferPosition end

The end position of the range.

| Improve this Doc View Source

BufferRange(Int32, Int32, Int32, Int32)

Creates a new instance of the BufferRange class.

Declaration
public BufferRange(int startLine, int startColumn, int endLine, int endColumn)
Parameters
Type Name Description
System.Int32 startLine

The 1-based starting line number of the range.

System.Int32 startColumn

The 1-based starting column number of the range.

System.Int32 endLine

The 1-based ending line number of the range.

System.Int32 endColumn

The 1-based ending column number of the range.

Fields

| Improve this Doc View Source

None

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

Declaration
public static readonly BufferRange None

Properties

| Improve this Doc View Source

End

Gets the end position of the range in the buffer.

Declaration
public BufferPosition End { get; }
Type Description
BufferPosition
| Improve this Doc View Source

HasRange

Returns true if the current range is non-zero, i.e. contains valid start and end positions.

Declaration
public bool HasRange { get; }
Type Description
System.Boolean
| Improve this Doc View Source

Start

Gets the start position of the range in the buffer.

Declaration
public BufferPosition Start { get; }
Type Description
BufferPosition

Methods

| Improve this Doc View Source

Equals(Object)

Compares two instances of the BufferRange 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 ranges 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.

  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX