SyntaxTree.WithDiagnosticOptions 方法

定义

注意

Obsolete due to performance problems, use CompilationOptions.SyntaxTreeOptionsProvider instead

返回一个新树,该 DiagnosticOptions 树是指定值,其他属性是从当前树复制的。

public virtual Microsoft.CodeAnalysis.SyntaxTree WithDiagnosticOptions (System.Collections.Immutable.ImmutableDictionary<string,Microsoft.CodeAnalysis.ReportDiagnostic> options);
[System.Obsolete("Obsolete due to performance problems, use CompilationOptions.SyntaxTreeOptionsProvider instead", false)]
public virtual Microsoft.CodeAnalysis.SyntaxTree WithDiagnosticOptions (System.Collections.Immutable.ImmutableDictionary<string,Microsoft.CodeAnalysis.ReportDiagnostic> options);
abstract member WithDiagnosticOptions : System.Collections.Immutable.ImmutableDictionary<string, Microsoft.CodeAnalysis.ReportDiagnostic> -> Microsoft.CodeAnalysis.SyntaxTree
override this.WithDiagnosticOptions : System.Collections.Immutable.ImmutableDictionary<string, Microsoft.CodeAnalysis.ReportDiagnostic> -> Microsoft.CodeAnalysis.SyntaxTree
[<System.Obsolete("Obsolete due to performance problems, use CompilationOptions.SyntaxTreeOptionsProvider instead", false)>]
abstract member WithDiagnosticOptions : System.Collections.Immutable.ImmutableDictionary<string, Microsoft.CodeAnalysis.ReportDiagnostic> -> Microsoft.CodeAnalysis.SyntaxTree
override this.WithDiagnosticOptions : System.Collections.Immutable.ImmutableDictionary<string, Microsoft.CodeAnalysis.ReportDiagnostic> -> Microsoft.CodeAnalysis.SyntaxTree
Public Overridable Function WithDiagnosticOptions (options As ImmutableDictionary(Of String, ReportDiagnostic)) As SyntaxTree

参数

options
ImmutableDictionary<String,ReportDiagnostic>

从诊断 ID 到诊断报告级别的映射。 诊断 ID 可能区分大小写,具体取决于语言。

返回

属性

适用于