Share via


IBufferGraph.MapUpToFirstMatch, méthode (SnapshotPoint, PointTrackingMode, Predicate<ITextSnapshot>, PositionAffinity)

Mappe une position dans l'instantané actuel d'une mémoire tampon membre du graphique de mémoire tampon vers l'instantané d'une mémoire tampon sélectionnée par un prédicat.

Espace de noms :  Microsoft.VisualStudio.Text.Projection
Assembly :  Microsoft.VisualStudio.Text.Data (dans Microsoft.VisualStudio.Text.Data.dll)

Syntaxe

'Déclaration
Function MapUpToFirstMatch ( _
    point As SnapshotPoint, _
    trackingMode As PointTrackingMode, _
    match As Predicate(Of ITextSnapshot), _
    affinity As PositionAffinity _
) As Nullable(Of SnapshotPoint)
Nullable<SnapshotPoint> MapUpToFirstMatch(
    SnapshotPoint point,
    PointTrackingMode trackingMode,
    Predicate<ITextSnapshot> match,
    PositionAffinity affinity
)
Nullable<SnapshotPoint> MapUpToFirstMatch(
    SnapshotPoint point, 
    PointTrackingMode trackingMode, 
    Predicate<ITextSnapshot^>^ match, 
    PositionAffinity affinity
)
abstract MapUpToFirstMatch : 
        point:SnapshotPoint * 
        trackingMode:PointTrackingMode * 
        match:Predicate<ITextSnapshot> * 
        affinity:PositionAffinity -> Nullable<SnapshotPoint> 
function MapUpToFirstMatch(
    point : SnapshotPoint, 
    trackingMode : PointTrackingMode, 
    match : Predicate<ITextSnapshot>, 
    affinity : PositionAffinity
) : Nullable<SnapshotPoint>

Paramètres

  • match
    Type : Predicate<ITextSnapshot>

    Prédicat qui identifie la mémoire tampon cible.

  • affinity
    Type : Microsoft.VisualStudio.Text.PositionAffinity

    Si le mappage est ambigu (s'il se trouve à la limite d'une étendue source), détermine si le mappage doit cibler la position immédiatement après le caractère précédent ou immédiatement avant le caractère suivant dans une mémoire tampon supérieure.

    Ce paramètre n'a pas d'effet si le mappage n'est pas ambigu.

Valeur de retour

Type : Nullable<SnapshotPoint>
La position correspondante dans un instantané de la mémoire tampon correspondante, ou nullune référence null (Nothing en Visual Basic) si ne mappe pas à la mémoire tampon correspondante.

Exceptions

Exception Condition
ArgumentNullException

point. L'instantané ou l'match est nullune référence null (Nothing en Visual Basic).

ArgumentOutOfRangeException

trackingMode n'est pas PointTrackingMode valide, ou affinity n'est pas PositionAffinity valide.

Notes

match est appelé pour chaque mémoire tampon de texte dans le graphique de mémoire tampon jusqu'à ce qu'il retourne true. L'attribut ne sera pas appelé à nouveau.

Sécurité .NET Framework

Voir aussi

Référence

IBufferGraph Interface

MapUpToFirstMatch, surcharge

Microsoft.VisualStudio.Text.Projection, espace de noms