SyntaxTree.WithDiagnosticOptions Method

Definition

Caution

Obsolete due to performance problems, use CompilationOptions.SyntaxTreeOptionsProvider instead

Returns a new tree whose DiagnosticOptions are the specified value and other properties are copied from the current tree.

C#
public virtual Microsoft.CodeAnalysis.SyntaxTree WithDiagnosticOptions(System.Collections.Immutable.ImmutableDictionary<string,Microsoft.CodeAnalysis.ReportDiagnostic> options);
C#
[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);

Parameters

options
ImmutableDictionary<String,ReportDiagnostic>

A mapping from diagnostic id to diagnostic reporting level. The diagnostic ID may be case-sensitive depending on the language.

Returns

Attributes

Applies to

Product Versions (Obsolete)
Roslyn 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0 (4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0)