Share via


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

Mappe une position dans le graphique à une position d'une mémoire tampon correspondante inférieure dans le graphique. Les mémoires tampons source sont considérées comme inférieures aux mémoires tampons de projection qui les consomment.

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

Syntaxe

'Déclaration
Function MapDownToFirstMatch ( _
    position As SnapshotPoint, _
    trackingMode As PointTrackingMode, _
    match As Predicate(Of ITextSnapshot), _
    affinity As PositionAffinity _
) As Nullable(Of SnapshotPoint)
Nullable<SnapshotPoint> MapDownToFirstMatch(
    SnapshotPoint position,
    PointTrackingMode trackingMode,
    Predicate<ITextSnapshot> match,
    PositionAffinity affinity
)
Nullable<SnapshotPoint> MapDownToFirstMatch(
    SnapshotPoint position, 
    PointTrackingMode trackingMode, 
    Predicate<ITextSnapshot^>^ match, 
    PositionAffinity affinity
)
abstract MapDownToFirstMatch : 
        position:SnapshotPoint * 
        trackingMode:PointTrackingMode * 
        match:Predicate<ITextSnapshot> * 
        affinity:PositionAffinity -> Nullable<SnapshotPoint> 
function MapDownToFirstMatch(
    position : 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>
Un point dans un instantané de la mémoire tampon cible, ou nullune référence null (Nothing en Visual Basic) si la position ne mappe vers le bas à aucune mémoire tampon sélectionnée par match.

Exceptions

Exception Condition
ArgumentNullException

position. 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

L'attribut d'match est appelé à chaque mémoire tampon de texte dans le graphique de mémoire tampon jusqu'à ce qu'il retourne true. Après que l'attribut n'est pas appelé à nouveau.

Sécurité .NET Framework

Voir aussi

Référence

IBufferGraph Interface

MapDownToFirstMatch, surcharge

Microsoft.VisualStudio.Text.Projection, espace de noms