Partilhar via


Método IVsTextLines.ReloadLines

Substitui o texto sem excluir marcadores.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (em Microsoft.VisualStudio.TextManager.Interop.dll)

Sintaxe

'Declaração
Function ReloadLines ( _
    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 ReloadLines(
    int iStartLine,
    int iStartIndex,
    int iEndLine,
    int iEndIndex,
    IntPtr pszText,
    int iNewLen,
    TextSpan[] pChangedSpan
)
int ReloadLines(
    [InAttribute] int iStartLine, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndLine, 
    [InAttribute] int iEndIndex, 
    [InAttribute] IntPtr pszText, 
    [InAttribute] int iNewLen, 
    [OutAttribute] array<TextSpan>^ pChangedSpan
)
abstract ReloadLines : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pszText:IntPtr * 
        iNewLen:int * 
        pChangedSpan:TextSpan[] byref -> int
function ReloadLines(
    iStartLine : int, 
    iStartIndex : int, 
    iEndLine : int, 
    iEndIndex : int, 
    pszText : IntPtr, 
    iNewLen : int, 
    pChangedSpan : TextSpan[]
) : int

Parâmetros

  • iStartLine
    Tipo: Int32

    [in] Linha inicial.

  • iStartIndex
    Tipo: Int32

    [in] Índice de caractere inicial dentro da linha. Deve ser menor ou igual ao comprimento da linha.

  • iEndLine
    Tipo: Int32

    [in] Final de linha.

  • iEndIndex
    Tipo: Int32

    [in] Índice do caractere de final dentro da linha. Deve ser les que ou igual ao comprimento da linha.

  • pszText
    Tipo: IntPtr

    [in] Ponteiro ou uma referência para o texto a ser inserido.

  • iNewLen
    Tipo: Int32

    [in] Comprimento do texto recentemente inserido.

Valor de retorno

Tipo: Int32
Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De textmgr.idl:

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

Este método é semelhante a ReplaceLines, mas ele substituirá o texto sem excluir marcadores. Use esse método em circunstâncias especiais, como quando um buffer é recarregado a partir do disco e você deseja remover todas as marcas (por exemplo, pontos de interrupção) ou quando um assistente está substituindo uma seção específica do código.

Segurança do .NET Framework

Consulte também

Referência

IVsTextLines Interface

Namespace Microsoft.VisualStudio.TextManager.Interop