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
- 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]
- pTags
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextSpanSet
[in]
- pbstrComputedText
Type: System.String%
[out]
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.