Method AddDocument
- Namespace
- Alternet.Syntax.Parsers.Roslyn.CodeCompletion
- Assembly
- Alternet.Syntax.Parsers.Roslyn.v9.dll
AddDocument(string, SourceText, ProjectId, bool)
Adds a new document to the project.
public virtual 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.Text.SourceText
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, string, ProjectId, bool)
Adds a new document to the project.
public virtual 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.