共用方式為


VsShellUtilities.GetRunningDocumentContents(IServiceProvider, String) Method

Definition

Gets the text of the specified file, if it exists in the running document table.

public:
 static System::String ^ GetRunningDocumentContents(IServiceProvider ^ site, System::String ^ path);
public static string GetRunningDocumentContents (IServiceProvider site, string path);
static member GetRunningDocumentContents : IServiceProvider * string -> string
Public Shared Function GetRunningDocumentContents (site As IServiceProvider, path As String) As String
Public Function GetRunningDocumentContents (site As IServiceProvider, path As String) As String

Parameters

site
IServiceProvider

The service provider.

path
String

Path to the file.

Returns

The contents of the file if it is loaded by RDT. Otherwise it returns null.

Applies to