IPersistentSpan Interface
Describes a span in a document that remains valid even when the document is closed, opened, or modified (while it is open).
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
| Name | Description | |
|---|---|---|
![]() | Document | Gets the span's ITextDocument if the underlying document is open, or null if the document is closed. |
![]() | FilePath | Gets the file path of the document. |
![]() | IsDocumentOpen | Determines whether the document associated with the IPersistentSpan is currently open. |
![]() | Span | Gets the span's ITrackingSpan if the underlying document is open, or null if the document is closed. |
| Name | Description | |
|---|---|---|
![]() | Dispose() | (Inherited from IDisposable.) |
![]() | TryGetEndLineIndex(Int32, Int32) | Get the ending point of the span as a line number and offset from the start of the line./// </summary>/// <param name="endLine"> </param>/// <param name="endIndex"> </param>/// <returns> </returns>/// <remarks>/// <para> </para>/// </remarks> |
![]() | TryGetSpan(Span) | Get the span as a character offset from the start of the buffer./// </summary>/// <param name="span"> </param>/// <returns> </returns>/// <remarks>/// <para> </para>/// </remarks> |
![]() | TryGetStartLineIndex(Int32, Int32) | Gets the starting point of the span as a line number and offset from the start of the line./// </summary>/// <para> </para>/// </remarks> |
Persistent spans are similar to tracking spans, except they can be created on closed documents and will continue to track even when a document is closed and reopened. These spans track changes that are made only while the document is open. They do not track changes that are made to the document while the document is closed (through Notepad or something similar).

