Partager via


EditorFactory.IsOurFileFormat Method

Checks whether there is an editor that can handle this extension.

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

Syntax

'Declaration
Public Overridable Function IsOurFileFormat ( _
    moniker As String _
) As Boolean
public virtual bool IsOurFileFormat(
    string moniker
)
public:
virtual bool IsOurFileFormat(
    String^ moniker
)
abstract IsOurFileFormat : 
        moniker:string -> bool  
override IsOurFileFormat : 
        moniker:string -> bool
public function IsOurFileFormat(
    moniker : String
) : boolean

Parameters

  • moniker
    Type: String

    The extension for which an editor is desired.

Return Value

Type: Boolean
By default returns true. Implementations should override this method to handle their own file formats.

Remarks

Notes to Inheritors

This method is called when the user has not explicitly requested a known editor, the file extension does not match a registered extension, and the wildcard extension "*" has been registered. Return true if there is a registered editor, otherwise false. Visual Studio will find the next best editor in the list.

.NET Framework Security

See Also

Reference

EditorFactory Class

Microsoft.VisualStudio.Package Namespace