Compartilhar via


VersionedTextDocumentPositionContract Struct

Definition

A struct describing a explicitly versioned position in a document.

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

Remarks

TextPosition is one of three closely related concepts: - Position: Thick object representing a range of text in an ITextDocument. This type should be used in all code within the same process. - VersionedTextDocumentPositionContract: A serializable representation of TextPositionContract that can be sent between processes over RPC. This type should be used in most RPC contracts between processes. - TextPositionContract: A serialiable representation of TextPositionContract that can be sent between processes over RPC. As opposed to VersionedTextDocumentPositionContract, 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 position 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

VersionedTextDocumentPositionContract(TextDocumentContract, Int32, Int32)

Initializes a new instance of the VersionedTextDocumentPositionContract struct.

Properties

Column

Gets the column (0-based) of the position.

Document

Gets a reference to the information describing the underlying document.

Line

Gets the line (0-based) of the position.

Operators

Implicit(VersionedTextDocumentPositionContract to TextPositionContract)

Implicitly converts the VersionedTextDocumentPositionContract to TextPositionContract.

Applies to