Compartir a través de


IProjectionSnapshot2.GetMatchingSnapshotInClosure Method

Definition

Overloads

GetMatchingSnapshotInClosure(ITextBuffer)

Computes the snapshot of targetBuffer that is a contributor to this snapshot. If targetBuffer is not in the source closure of this snapshot, return null.

GetMatchingSnapshotInClosure(Predicate<ITextBuffer>)

For each snapshot in the source closure of this snapshot, call the match predicate on the corresponding text buffer, and return the first source snapshot for which it returns true. The order in which the source snapshots are visited is undefined.

GetMatchingSnapshotInClosure(ITextBuffer)

Computes the snapshot of targetBuffer that is a contributor to this snapshot. If targetBuffer is not in the source closure of this snapshot, return null.

public:
 Microsoft::VisualStudio::Text::ITextSnapshot ^ GetMatchingSnapshotInClosure(Microsoft::VisualStudio::Text::ITextBuffer ^ targetBuffer);
public:
 Microsoft::VisualStudio::Text::ITextSnapshot ^ GetMatchingSnapshotInClosure(Microsoft::VisualStudio::Text::ITextBuffer ^ targetBuffer);
Microsoft::VisualStudio::Text::ITextSnapshot GetMatchingSnapshotInClosure(Microsoft::VisualStudio::Text::ITextBuffer const & targetBuffer);
public Microsoft.VisualStudio.Text.ITextSnapshot GetMatchingSnapshotInClosure (Microsoft.VisualStudio.Text.ITextBuffer targetBuffer);
abstract member GetMatchingSnapshotInClosure : Microsoft.VisualStudio.Text.ITextBuffer -> Microsoft.VisualStudio.Text.ITextSnapshot
Public Function GetMatchingSnapshotInClosure (targetBuffer As ITextBuffer) As ITextSnapshot

Parameters

targetBuffer
ITextBuffer

The target buffer.

Returns

The resulting text snapshot.

Exceptions

if targetBuffer is null.

Applies to

GetMatchingSnapshotInClosure(Predicate<ITextBuffer>)

For each snapshot in the source closure of this snapshot, call the match predicate on the corresponding text buffer, and return the first source snapshot for which it returns true. The order in which the source snapshots are visited is undefined.

public:
 Microsoft::VisualStudio::Text::ITextSnapshot ^ GetMatchingSnapshotInClosure(Predicate<Microsoft::VisualStudio::Text::ITextBuffer ^> ^ match);
public Microsoft.VisualStudio.Text.ITextSnapshot GetMatchingSnapshotInClosure (Predicate<Microsoft.VisualStudio.Text.ITextBuffer> match);
abstract member GetMatchingSnapshotInClosure : Predicate<Microsoft.VisualStudio.Text.ITextBuffer> -> Microsoft.VisualStudio.Text.ITextSnapshot
Public Function GetMatchingSnapshotInClosure (match As Predicate(Of ITextBuffer)) As ITextSnapshot

Parameters

match
Predicate<ITextBuffer>

The predicate for matching.

Returns

The resulting text snapshot.

Exceptions

if match is null.

Applies to