Поделиться через


IVsTextImageUtilities.GetReplaceText - метод

Пространство имен:  Microsoft.VisualStudio.TextManager.Interop
Сборка:  Microsoft.VisualStudio.TextManager.Interop (в Microsoft.VisualStudio.TextManager.Interop.dll)

Синтаксис

'Декларация
Function GetReplaceText ( _
    grfOptions As UInteger, _
    pszReplace As String, _
    pText As IVsTextImage, _
    pMatch As TextSpan(), _
    pTags As IVsTextSpanSet, _
    <OutAttribute> ByRef pbstrComputedText As String _
) As Integer
int GetReplaceText(
    uint grfOptions,
    string pszReplace,
    IVsTextImage pText,
    TextSpan[] pMatch,
    IVsTextSpanSet pTags,
    out string pbstrComputedText
)
int GetReplaceText(
    [InAttribute] unsigned int grfOptions, 
    [InAttribute] String^ pszReplace, 
    [InAttribute] IVsTextImage^ pText, 
    [InAttribute] array<TextSpan>^ pMatch, 
    [InAttribute] IVsTextSpanSet^ pTags, 
    [OutAttribute] String^% pbstrComputedText
)
abstract GetReplaceText : 
        grfOptions:uint32 * 
        pszReplace:string * 
        pText:IVsTextImage * 
        pMatch:TextSpan[] * 
        pTags:IVsTextSpanSet * 
        pbstrComputedText:string byref -> int
function GetReplaceText(
    grfOptions : uint, 
    pszReplace : String, 
    pText : IVsTextImage, 
    pMatch : TextSpan[], 
    pTags : IVsTextSpanSet, 
    pbstrComputedText : String
) : int

Параметры

  • grfOptions
    Тип: UInt32

    [in] параметры поиска. Значения vsFindOptions перечисления.

  • pszReplace
    Тип: String

    [in] строка замены.

  • pbstrComputedText
    Тип: String%

    [out]

Возвращаемое значение

Тип: Int32
Если метод завершается успешно, возвращается S_OK.Если происходит сбой, возвращается код ошибки.

Заметки

Модель COM подписи

Из textfind.idl:

HRESULT IVsTextImageUtilities::GetReplaceText(
   [in] VSFINDOPTIONS grfOptions,
   [in] LPCOLESTR pszReplace,
   [in] IVsTextImage * pText,
   [in] const TextSpan * pMatch,
   [in] IVsTextSpanSet * pTags,
   [out, retval] BSTR * pbstrComputedText
);

При отсутствии операцию синхронного поиска регулярного выражения и заменять с тегами, pTags может быть nullссылка NULL (Nothing в Visual Basic). При наличии pTags" pMatch может быть null.

Безопасность платформы .NET Framework

См. также

Ссылки

IVsTextImageUtilities Интерфейс

Microsoft.VisualStudio.TextManager.Interop - пространство имен