Class BufferRange
Provides details about a range between two positions in a file buffer.
Inheritance
Namespace:Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class BufferRange
Constructors
| Improve this Doc View SourceBufferRange(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. |
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 SourceNone
Provides an instance that represents a range that has not been set.
Declaration
public static readonly BufferRange None
Properties
| Improve this Doc View SourceEnd
Gets the end position of the range in the buffer.
Declaration
public BufferPosition End { get; }
Type | Description |
---|---|
BufferPosition |
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 |
Start
Gets the start position of the range in the buffer.
Declaration
public BufferPosition Start { get; }
Type | Description |
---|---|
BufferPosition |
Methods
| Improve this Doc View SourceEquals(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. |
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. |