Share via


LanguageService.OpenDocument Method

Opens the specified file.

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
Public Sub OpenDocument ( _
    path As String _
)
public void OpenDocument(
    string path
)
public:
void OpenDocument(
    String^ path
)
member OpenDocument : 
        path:string -> unit
public function OpenDocument(
    path : String
)

Parameters

  • path
    Type: String

    [in] The specified file to open.

Remarks

A language service typically does not need to open a source file so this method is seldom used. However, you can call this method to open a source file if your language service requires that functionality. Visual Studio normally loads a source file then instantiates your language service as needed.

The base method loads the specified source file using the current project.

.NET Framework Security

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace