IPersistentSpan Interface

Visual Studio 2015
 

Describes a span in a document that remains valid even when the document is closed, opened, or modified (while it is open).

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public interface IPersistentSpan : IDisposable

NameDescription
System_CAPS_pubpropertyDocument

Gets the span's ITextDocument if the underlying document is open, or null if the document is closed.

System_CAPS_pubpropertyFilePath

Gets the file path of the document.

System_CAPS_pubpropertyIsDocumentOpen

Determines whether the document associated with the IPersistentSpan is currently open.

System_CAPS_pubpropertySpan

Gets the span's ITrackingSpan if the underlying document is open, or null if the document is closed.

NameDescription
System_CAPS_pubmethodDispose()

(Inherited from IDisposable.)

System_CAPS_pubmethodTryGetEndLineIndex(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>

System_CAPS_pubmethodTryGetSpan(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>

System_CAPS_pubmethodTryGetStartLineIndex(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).

Return to top
Show: