次の方法で共有


ITrackingSpan.GetSpan Method

Definition

Overloads

GetSpan(ITextSnapshot)

Maps the tracking span to a particular snapshot of its text buffer.

GetSpan(ITextVersion)

Maps the TrackingSpan to a particular version of its text buffer.

GetSpan(ITextSnapshot)

Maps the tracking span to a particular snapshot of its text buffer.

public:
 Microsoft::VisualStudio::Text::SnapshotSpan GetSpan(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot);
Microsoft::VisualStudio::Text::SnapshotSpan GetSpan(Microsoft::VisualStudio::Text::ITextSnapshot const & snapshot);
public Microsoft.VisualStudio.Text.SnapshotSpan GetSpan (Microsoft.VisualStudio.Text.ITextSnapshot snapshot);
abstract member GetSpan : Microsoft.VisualStudio.Text.ITextSnapshot -> Microsoft.VisualStudio.Text.SnapshotSpan
Public Function GetSpan (snapshot As ITextSnapshot) As SnapshotSpan

Parameters

snapshot
ITextSnapshot

The snapshot to which to map the tracking span.

Returns

Exceptions

snapshot is null.

snapshot is not a snapshot of TextBuffer.

Applies to

GetSpan(ITextVersion)

Maps the TrackingSpan to a particular version of its text buffer.

public:
 Microsoft::VisualStudio::Text::Span GetSpan(Microsoft::VisualStudio::Text::ITextVersion ^ version);
public:
 Microsoft::VisualStudio::Text::Span GetSpan(Microsoft::VisualStudio::Text::ITextVersion ^ version);
Microsoft::VisualStudio::Text::Span GetSpan(Microsoft::VisualStudio::Text::ITextVersion const & version);
public Microsoft.VisualStudio.Text.Span GetSpan (Microsoft.VisualStudio.Text.ITextVersion version);
abstract member GetSpan : Microsoft.VisualStudio.Text.ITextVersion -> Microsoft.VisualStudio.Text.Span
Public Function GetSpan (version As ITextVersion) As Span

Parameters

version
ITextVersion

The version to which to map the tracking span.

Returns

Exceptions

version is null.

version is not a version of TextBuffer.

Applies to