共用方式為


IVsProjectAsyncOpen.ReopenItemAsync 方法

定義

以異步方式重新開啟專案中的專案。

public Microsoft.VisualStudio.Shell.Interop.IVsTask ReopenItemAsync(uint itemId, Guid editorType, string? physicalView, Guid logicalView, bool shouldGetDocDataFromRdt, object? docData);
abstract member ReopenItemAsync : uint32 * Guid * string * Guid * bool * obj -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function ReopenItemAsync (itemId As UInteger, editorType As Guid, physicalView As String, logicalView As Guid, shouldGetDocDataFromRdt As Boolean, docData As Object) As IVsTask

參數

itemId
UInt32

要開啟之項目的標識碼。 應該是 VSITEMID_ROOT 或其他有效的項目標識碼。 VSITEMID請參閱 列舉。

editorType
Guid

編輯器類型的唯一標識碼。

physicalView
String

實體檢視的名稱。 如果設定為 null, MapLogicalView 則會呼叫 。

logicalView
Guid

邏輯檢視的唯一標識符。 如果不是 GUID_NULL,表示要建立的特定檢視類型。 如需詳細資訊,請參閱 LOGVIEWID

shouldGetDocDataFromRdt
Boolean

如果 true為 ,則環境會使用從執行中檔數據表取得的檔數據對象,否則服務會使用傳入的檔 docData數據來開啟檔。

docData
Object

要開啟或 null之專案之文件數據對象的參考。 如果 shouldGetDocDataFromRdttrue,則會忽略傳遞至此參數的這個值。

傳回

表示重新開啟作業的工作。 工作的結果是 IVsAsyncOpenDocumentResult 重新開啟項目的 。

備註

OpenItemAsync(UInt32, Guid, Boolean, Object)類似於 ,但您呼叫 OpenSpecificEditorAsync (,而不是 OpenStandardEditorAsync) 。

ReopenItemAsync(UInt32, Guid, String, Guid, Boolean, Object) 作 以處理屬於專案之檔案的自動重新開啟。 例如,當使用者將檔案新增至您所建立的項目類型時,關閉專案,稍後再重新開啟它,實 ReopenItemAsync(UInt32, Guid, String, Guid, Boolean, Object) 作 以同時開啟屬於新專案類型的檔案。

這個方法所傳回的工作不會指出文件檢視和 docdata 已載入。 如需更多詳細資料,請參閱 DocumentLoadTask \(英文\)。

適用於