IPersistentSpan Interface
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Describes span in a document that remains valid even when the document is closed, opened or modified (while it is open).
public interface class IPersistentSpan : IDisposable
public interface IPersistentSpan : IDisposable
type IPersistentSpan = interface
interface IDisposable
Public Interface IPersistentSpan
Implements IDisposable
- Implements
PersistentSpans are similar to ITrackingSpans, except they can be created on closed documents and will continue to track even when a document is closed and reopened.
These spans only track changes made while the document is open. They will not track changes made to the document while the document is closed (through Notepad or something similar).
Document |
Returns the span's ITextDocument if the underlying document is open (and null if the document is closed). |
File |
Returns the file path of the document. |
Is |
Returns true if the document associated with the IPersistentSpan is currently open. |
Span |
Returns the span's ITrackingSpan if the underlying document is open (and null if the document is closed). |
Try |
Get the ending point of the span as a line number and offset from the start of the line. |
Try |
Get the span as a character offset from the start of the buffer. |
Try |
Get the starting point of the span as a line number and offset from the start of the line. |
Product | Versions |
---|---|
Visual Studio SDK | 2015, 2017, 2019, 2022 |