IVsTextLines.ReplaceLines, méthode

Gère la modification comme un flux de ligne, telle que la ligne arrêtant et se joindre de ligne.

Espace de noms :  Microsoft.VisualStudio.TextManager.Interop
Assembly :  Microsoft.VisualStudio.TextManager.Interop (dans Microsoft.VisualStudio.TextManager.Interop.dll)

Syntaxe

'Déclaration
Function ReplaceLines ( _
    iStartLine As Integer, _
    iStartIndex As Integer, _
    iEndLine As Integer, _
    iEndIndex As Integer, _
    pszText As IntPtr, _
    iNewLen As Integer, _
    <OutAttribute> pChangedSpan As TextSpan() _
) As Integer
int ReplaceLines(
    int iStartLine,
    int iStartIndex,
    int iEndLine,
    int iEndIndex,
    IntPtr pszText,
    int iNewLen,
    TextSpan[] pChangedSpan
)
int ReplaceLines(
    [InAttribute] int iStartLine, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndLine, 
    [InAttribute] int iEndIndex, 
    [InAttribute] IntPtr pszText, 
    [InAttribute] int iNewLen, 
    [OutAttribute] array<TextSpan>^ pChangedSpan
)
abstract ReplaceLines : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pszText:IntPtr * 
        iNewLen:int * 
        pChangedSpan:TextSpan[] byref -> int
function ReplaceLines(
    iStartLine : int, 
    iStartIndex : int, 
    iEndLine : int, 
    iEndIndex : int, 
    pszText : IntPtr, 
    iNewLen : int, 
    pChangedSpan : TextSpan[]
) : int

Paramètres

  • iStartLine
    Type : Int32

    [in] à partir de la ligne.

  • iStartIndex
    Type : Int32

    [in] démarrant l'index de caractère dans la ligne. Doit être inférieur ou égal à la longueur de la ligne.

  • iEndLine
    Type : Int32

    [in] terminant la ligne.

  • iEndIndex
    Type : Int32

    [in] index de caractère de fin dans la ligne. Doit être inférieur ou égal à la longueur de la ligne.

  • pszText
    Type : IntPtr

    [in] pointeur en texte pour insérer.

  • iNewLen
    Type : Int32

    [in] longueur du texte récemment inséré.

Valeur de retour

Type : Int32
Si la méthode réussit, elle retourne S_OK.En cas d'échec, un code d'erreur est retourné.

Notes

Signature de COM

De textmgr.idl :

HRESULT IVsTextLines::ReplaceLines(
   [in] long iStartLine,
   [in] CharIndex iStartIndex,
   [in] long iEndLine,
   [in] CharIndex iEndIndex,
   [in] LPCWSTR pszText,
   [in] long iNewLen,
   [out] TextSpan *pChangedSpan
);

Utilisez cette méthode pour compléter des modifications au texte de la mémoire tampon. Pour remplacer le texte sans remplacer des marques, ReloadLines d'utilisation.

Sécurité .NET Framework

Voir aussi

Référence

IVsTextLines Interface

Microsoft.VisualStudio.TextManager.Interop, espace de noms