Compilation.GetSemanticModel(SyntaxTree, Boolean) 方法

定义

获取指定语法树的一个新 SemanticModel 项。

public Microsoft.CodeAnalysis.SemanticModel GetSemanticModel (Microsoft.CodeAnalysis.SyntaxTree syntaxTree, bool ignoreAccessibility = false);
member this.GetSemanticModel : Microsoft.CodeAnalysis.SyntaxTree * bool -> Microsoft.CodeAnalysis.SemanticModel
Public Function GetSemanticModel (syntaxTree As SyntaxTree, Optional ignoreAccessibility As Boolean = false) As SemanticModel

参数

syntaxTree
SyntaxTree

指定的语法树。

ignoreAccessibility
Boolean

如果 SemanticModel 在回答语义问题时应忽略辅助功能规则,则为 True。

返回

适用于