다음을 통해 공유


IVsTextImageUtilities.GetReplaceText Method

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

Syntax

‘선언
Function GetReplaceText ( _
    grfOptions As UInteger, _
    pszReplace As String, _
    pText As IVsTextImage, _
    pMatch As TextSpan(), _
    pTags As IVsTextSpanSet, _
    <OutAttribute> ByRef pbstrComputedText As String _
) As Integer
‘사용 방법
Dim instance As IVsTextImageUtilities
Dim grfOptions As UInteger
Dim pszReplace As String
Dim pText As IVsTextImage
Dim pMatch As TextSpan()
Dim pTags As IVsTextSpanSet
Dim pbstrComputedText As String
Dim returnValue As Integer

returnValue = instance.GetReplaceText(grfOptions, _
    pszReplace, pText, pMatch, pTags, _
    pbstrComputedText)
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

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From 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
);

If you do not have a regex find/replace with tags, pTags can be nulla null reference (Nothing in Visual Basic). If you have pTags, pMatch can be null.

.NET Framework Security

See Also

Reference

IVsTextImageUtilities Interface

IVsTextImageUtilities Members

Microsoft.VisualStudio.TextManager.Interop Namespace