Table of Contents

Method AddDocument

Namespace
Alternet.Syntax.Parsers.Roslyn
Assembly
Alternet.Syntax.Parsers.Roslyn.v9.dll

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 string

File name of the Microsoft.CodeAnalysis.Document.

text string

New Microsoft.CodeAnalysis.Document text.

projectId ProjectId

Specifies Project to add document to

open bool

Specifies 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 string

File name of the Microsoft.CodeAnalysis.Document.

text SourceText

New Microsoft.CodeAnalysis.Document text.

projectId ProjectId

Specifies Project to add document to

open bool

Specifies if document needs to be open in the workspace.

Returns

DocumentId

Microsoft.CodeAnalysis.DocumentId to be added.