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 (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'宣言
Public Sub OpenDocument ( _
path As String _
)
'使用
Dim instance As LanguageService
Dim path As String
instance.OpenDocument(path)
public void OpenDocument(
string path
)
public:
void OpenDocument(
String^ path
)
member OpenDocument :
path:string -> unit
public function OpenDocument(
path : String
)
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.