共用方式為


TextPositionContract Struct

Definition

A struct describing a position in a document version.

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

Remarks

TextPositionContract is one of three closely related concepts: - TextPosition: Thick object representing a range of text in a ITextDocumentSnapshot. 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 TextPositionContract, 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

TextPositionContract(Int32, Int32)

Initializes a new instance of the TextPositionContract struct.

Properties

Column

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

Line

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

Applies to