Solution.WithDocumentSyntaxRoot 方法

定义

创建一个新的解决方案实例,其中包含指定的文档,以具有由指定语法节点根目录的语法树。

public Microsoft.CodeAnalysis.Solution WithDocumentSyntaxRoot (Microsoft.CodeAnalysis.DocumentId documentId, Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.PreservationMode mode = Microsoft.CodeAnalysis.PreservationMode.PreserveValue);
member this.WithDocumentSyntaxRoot : Microsoft.CodeAnalysis.DocumentId * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.PreservationMode -> Microsoft.CodeAnalysis.Solution
Public Function WithDocumentSyntaxRoot (documentId As DocumentId, root As SyntaxNode, Optional mode As PreservationMode = Microsoft.CodeAnalysis.PreservationMode.PreserveValue) As Solution

参数

documentId
DocumentId
root
SyntaxNode

返回

适用于