共用方式為


Workspace.ApplyDocumentAdded(DocumentInfo, SourceText) 方法

定義

這個方法會在 期間 TryApplyChanges(Solution) 呼叫,以將新檔新增至專案。

覆寫此方法以實作新增檔的功能。

protected:
 virtual void ApplyDocumentAdded(Microsoft::CodeAnalysis::DocumentInfo ^ info, Microsoft::CodeAnalysis::Text::SourceText ^ text);
protected virtual void ApplyDocumentAdded (Microsoft.CodeAnalysis.DocumentInfo info, Microsoft.CodeAnalysis.Text.SourceText text);
abstract member ApplyDocumentAdded : Microsoft.CodeAnalysis.DocumentInfo * Microsoft.CodeAnalysis.Text.SourceText -> unit
override this.ApplyDocumentAdded : Microsoft.CodeAnalysis.DocumentInfo * Microsoft.CodeAnalysis.Text.SourceText -> unit
Protected Overridable Sub ApplyDocumentAdded (info As DocumentInfo, text As SourceText)

參數

text
SourceText

適用於