IVsTextImageUtilities.GetReplaceText(UInt32, String, IVsTextImage, TextSpan[], IVsTextSpanSet, String) Methode

Definition

Ruft den Ersetzungstext für Such-und Ersetzungs Vorgänge ab.

public:
 int GetReplaceText(System::UInt32 grfOptions, System::String ^ pszReplace, Microsoft::VisualStudio::TextManager::Interop::IVsTextImage ^ pText, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pMatch, Microsoft::VisualStudio::TextManager::Interop::IVsTextSpanSet ^ pTags, [Runtime::InteropServices::Out] System::String ^ % pbstrComputedText);
int GetReplaceText(unsigned int grfOptions, std::wstring const & pszReplace, Microsoft::VisualStudio::TextManager::Interop::IVsTextImage const & pText, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pMatch, Microsoft::VisualStudio::TextManager::Interop::IVsTextSpanSet const & pTags, [Runtime::InteropServices::Out] std::wstring const & & pbstrComputedText);
public int GetReplaceText (uint grfOptions, string pszReplace, Microsoft.VisualStudio.TextManager.Interop.IVsTextImage pText, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pMatch, Microsoft.VisualStudio.TextManager.Interop.IVsTextSpanSet pTags, out string pbstrComputedText);
abstract member GetReplaceText : uint32 * string * Microsoft.VisualStudio.TextManager.Interop.IVsTextImage * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * Microsoft.VisualStudio.TextManager.Interop.IVsTextSpanSet * string -> int
Public Function GetReplaceText (grfOptions As UInteger, pszReplace As String, pText As IVsTextImage, pMatch As TextSpan(), pTags As IVsTextSpanSet, ByRef pbstrComputedText As String) As Integer

Parameter

grfOptions
UInt32

[in] Suchoptionen. Die Werte stammen aus der vsFindOptions-Enum.

pszReplace
String

[in] Ersetzungszeichenfolge.

pText
IVsTextImage

[in] Textbild, das die zu ersetzende Zeichenfolge enthält.

pMatch
TextSpan[]

in Die Such Übereinstimmung.

pTags
IVsTextSpanSet

in Optional, Satz von Text spannen, die die Such Übereinstimmung beschreiben. Abgerufen von GetTaggedSpans(IVsTextSpanSet) .

pbstrComputedText
String

vorgenommen Die Text Zeichenfolge zum ersetzen.

Gibt zurück

Int32

Wenn die Methode erfolgreich ist, wird S_OK zurückgegeben. Bei einem Fehler wird ein Fehlercode zurückgegeben.

Hinweise

COM-Signatur

Aus "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  
);  

Wenn Sie nicht über eine Regex-Suche/-Ersetzung mit Tags verfügen, pTags kann sein null . Wenn Sie über verfügen pTags , pMatch kann null.

Gilt für