LanguageService.IVsFormatFilterProvider.GetFormatFilterList(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a list of file extension filters suitable for a Save As dialog box.
virtual int Microsoft.VisualStudio.TextManager.Interop.IVsFormatFilterProvider.GetFormatFilterList([Runtime::InteropServices::Out] System::String ^ % pbstrFilterList) = Microsoft::VisualStudio::TextManager::Interop::IVsFormatFilterProvider::GetFormatFilterList;
int Microsoft.VisualStudio.TextManager.Interop.IVsFormatFilterProvider.GetFormatFilterList([Runtime::InteropServices::Out] std::wstring const & & pbstrFilterList);
int IVsFormatFilterProvider.GetFormatFilterList (out string pbstrFilterList);
abstract member Microsoft.VisualStudio.TextManager.Interop.IVsFormatFilterProvider.GetFormatFilterList : string -> int
override this.Microsoft.VisualStudio.TextManager.Interop.IVsFormatFilterProvider.GetFormatFilterList : string -> int
Function GetFormatFilterList (ByRef pbstrFilterList As String) As Integer Implements IVsFormatFilterProvider.GetFormatFilterList
Parameters
- pbstrFilterList
- String
[out] A string containing pairs of descriptions and extensions.
Returns
If successful, returns S_OK; otherwise, returns an error code.
Implements
Remarks
This method supplies a list of file extension filters formatted for a Save As dialog box. The extensions are formatted in pairs of descriptions and extensions, with each element separated by newlines. For example, a set of filters for C++ and C# files might formatted as "C++ files (*.cpp)\n*.cpp\nC# files (*.c#)\n*.c#\n". Visual Studio always prepends the filter list "All Files (*.*)\n*.*\nText Files (*.txt)\n*.txt\n" to whatever is returned from this method.
The base method calls Microsoft.VisualStudio.Package.LanguageService.GetFormatFilterList and replaces all vertical bar characters ("|") with newlines. The base method also insures the returns filter list is terminated by a newline. This method is an implementation of Microsoft.VisualStudio.TextManager.Interop.IVsFormatFilterProvider.GetFormatFilterList.