共用方式為


Workspace.GetDocumentIdInCurrentContext(SourceTextContainer) 方法

定義

取得目前內容中與指定文字容器相關聯的檔識別碼。 開啟檔時,檔通常會與文字容器相關聯。

public:
 virtual Microsoft::CodeAnalysis::DocumentId ^ GetDocumentIdInCurrentContext(Microsoft::CodeAnalysis::Text::SourceTextContainer ^ container);
public virtual Microsoft.CodeAnalysis.DocumentId GetDocumentIdInCurrentContext (Microsoft.CodeAnalysis.Text.SourceTextContainer container);
public virtual Microsoft.CodeAnalysis.DocumentId? GetDocumentIdInCurrentContext (Microsoft.CodeAnalysis.Text.SourceTextContainer container);
abstract member GetDocumentIdInCurrentContext : Microsoft.CodeAnalysis.Text.SourceTextContainer -> Microsoft.CodeAnalysis.DocumentId
override this.GetDocumentIdInCurrentContext : Microsoft.CodeAnalysis.Text.SourceTextContainer -> Microsoft.CodeAnalysis.DocumentId
Public Overridable Function GetDocumentIdInCurrentContext (container As SourceTextContainer) As DocumentId

參數

傳回

適用於