Method AddDocument
AddDocument(string, string, ProjectId, bool)
When implemented by a class, adds a new document to the project.
DocumentId AddDocument(string fileName, string text, ProjectId projectId = null, bool open = true)
Parameters
fileName
stringFile name of the
Microsoft.CodeAnalysis.Document
.text
stringNew
Microsoft.CodeAnalysis.Document
text.projectId
ProjectIdSpecifies Project to add document to
open
boolSpecifies if document needs to be open in the workspace.
Returns
- DocumentId
Microsoft.CodeAnalysis.DocumentId
to be added.
AddDocument(string, SourceText, ProjectId, bool)
Adds a new document to the project.
DocumentId AddDocument(string fileName, SourceText text, ProjectId projectId = null, bool open = true)
Parameters
fileName
stringFile name of the
Microsoft.CodeAnalysis.Document
.text
SourceTextNew
Microsoft.CodeAnalysis.Document
text.projectId
ProjectIdSpecifies Project to add document to
open
boolSpecifies if document needs to be open in the workspace.
Returns
- DocumentId
Microsoft.CodeAnalysis.DocumentId
to be added.