Compartilhar via


LanguageService.IVsFormatFilterProvider.GetFormatFilterList Method

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

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaration
Private Function GetFormatFilterList ( _
    <OutAttribute> ByRef pbstrFilterList As String _
) As Integer Implements IVsFormatFilterProvider.GetFormatFilterList
int IVsFormatFilterProvider.GetFormatFilterList(
    out string pbstrFilterList
)
private:
virtual int GetFormatFilterList(
    [OutAttribute] String^% pbstrFilterList
) sealed = IVsFormatFilterProvider::GetFormatFilterList
private abstract GetFormatFilterList : 
        pbstrFilterList:string byref -> int  
private override GetFormatFilterList : 
        pbstrFilterList:string byref -> int
JScript does not support explicit interface implementations.

Parameters

  • pbstrFilterList
    Type: String%

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

Return Value

Type: Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsFormatFilterProvider.GetFormatFilterList(String%)

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 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 IVsFormatFilterProvider.GetFormatFilterList.

.NET Framework Security

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace