Workspace.GetDocumentIdInCurrentContext(SourceTextContainer) 方法

定义

获取与其当前上下文中给定文本容器关联的文档的 ID。 打开文档时,文档通常与文本容器关联。

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

参数

返回

适用于