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.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
‘선언
Public Sub OpenDocument ( _
path As String _
)
public void OpenDocument(
string path
)
Parameters
- path
Type: System.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.