IVsTextImageUtilities.GetReplaceText Method
Gets replace text for find/replace operations.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Declaração
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
Parameters
- grfOptions
Type: System.UInt32
[in] Find options. Values are from the vsFindOptions enum.
- pszReplace
Type: System.String
[in] Replacement string.
- pText
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextImage
[in] Text image containing string to replace.
- pMatch
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in] The Find match.
- pTags
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextSpanSet
[in] Optional, set of text spans describing the Find match. Obtained by GetTaggedSpans.
- pbstrComputedText
Type: System.String%
[out] The replace text string.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.