LanguageService.IVsFormatFilterProvider.GetFormatFilterList(String) LanguageService.IVsFormatFilterProvider.GetFormatFilterList(String) Method

Definition

Returns a list of file extension filters suitable for a Save As dialog box.

int IVsFormatFilterProvider.GetFormatFilterList (out string pbstrFilterList);
Function GetFormatFilterList (ByRef pbstrFilterList As String) As Integer Implements IVsFormatFilterProvider.GetFormatFilterList
Parameters
pbstrFilterList
String String

[out] A string containing pairs of descriptions and extensions.

Returns

If successful, returns S_OK; otherwise, returns an error code.

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.

Applies to