共用方式為


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>

從診斷識別碼到診斷報告層級的對應。 根據語言而定,診斷識別碼可能會區分大小寫。

傳回

屬性

適用於