Compartir a través de


TextLineChange Structure

Provides settings for tracking changes to any text line in the buffer.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaración
Public Structure TextLineChange
public struct TextLineChange
public value class TextLineChange
[<Sealed>]
type TextLineChange =  struct end
JScript supports the use of structures, but not the declaration of new ones.

The TextLineChange type exposes the following members.

Methods

  Name Description
Public method Equals Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns the hash code for this instance. (Inherited from ValueType.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns the fully qualified type name of this instance. (Inherited from ValueType.)

Top

Fields

  Name Description
Public field iNewEndIndex Endpoint of the inserted text.
Public field iNewEndLine End line of the inserted text.
Public field iOldEndIndex End point of the deleted text.
Public field iOldEndLine End line of deleted text.
Public field iStartIndex Start point of the old and new text.
Public field iStartLine Start line of the old and new text.

Top

Remarks

The TextLineChange structure completely describes a text change. For example, for a Replace operation, the structure defines two spans, as follows:

  • From iStartLine/iStartIndex to iNewEndLine/iNewEndIndex. This span indicates the extent of the newly inserted text in terms of the buffer's current state.

  • From iStartLine/iStartIndex to iOldEndLine/iOldEndIndex. This span describes the extent of the text that was deleted, in terms of the buffer's state before the change.

Therefore, the structure contains information about the shape of the region before and after the change. The TextLineChange structure does not contain the old text that was deleted.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TextManager.Interop Namespace