This topic has not yet been rated - Rate this topic

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)
public struct TextLineChange

The TextLineChange type exposes the following members.

  NameDescription
Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from ValueType.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top
  NameDescription
Public fieldiNewEndIndexEndpoint of the inserted text.
Public fieldiNewEndLineEnd line of the inserted text.
Public fieldiOldEndIndexEnd point of the deleted text.
Public fieldiOldEndLineEnd line of deleted text.
Public fieldiStartIndexStart point of the old and new text.
Public fieldiStartLineStart line of the old and new text.
Top

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.