Udostępnij za pośrednictwem


VersionedTextDocumentRangeContract Struct

Definition

A struct describing a explicitly versioned range of text in a document.

[System.Runtime.Serialization.DataContract]
public readonly struct VersionedTextDocumentRangeContract
[<System.Runtime.Serialization.DataContract>]
type VersionedTextDocumentRangeContract = struct
Public Structure VersionedTextDocumentRangeContract
Inheritance
VersionedTextDocumentRangeContract
Attributes

Remarks

VersionedTextDocumentRangeContract is one of three closely related concepts: - TextRange: Thick object representing a range of text in a ITextDocumentSnapshot. This type should be used in all code within the same process. - VersionedTextDocumentRangeContract: A serializable representation of TextRange that can be sent between processes over RPC. This type should be used in most RPC contracts between processes. - Range: A serialiable representation of TextRange that can be sent between processes over RPC. As opposed to VersionedTextDocumentRangeContract, it omits the Uri and document version, making for a smaller serializable representation. This type should be used in RPC contracts that contain lots of range equivalents that need to reduce their payload size for performance. These RPC contracts will need to pass the document Uri and version for the range to be rehydrated into TextRange by IEditorHostService.

Constructors

VersionedTextDocumentRangeContract(TextDocumentContract, Int32, Int32, Int32, Int32)

Initializes a new instance of the VersionedTextDocumentRangeContract struct.

Properties

Document

Gets a reference to the information describing the underlying document.

EndColumn

Gets the offset (0-based) offset from the start of EndLine for the end of the span.

EndLine

Gets the line (0-based) of the end of the span.

StartColumn

Gets the offset (0-based) offset from the start of StartLine for the start of the span.

StartLine

Gets the line (0-based) of the start of the span.

Operators

Implicit(VersionedTextDocumentRangeContract to Range)

Implicitly converts the VersionedTextDocumentRangeContract to Range.

Applies to