Share via


CompilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync Method

Definition

Overloads

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, CancellationToken)

Returns syntax diagnostics produced by all Analyzers from analyzing the given tree. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Returns syntax diagnostics produced by given analyzers from analyzing the given tree. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

Returns syntax diagnostics produced by all Analyzers from analyzing the given tree, optionally scoped to a filterSpan. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree or filter span, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Returns syntax diagnostics produced by given analyzers from analyzing the given tree, optionally scoped to a filterSpan. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree or filter span, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

Returns syntax diagnostics produced by all Analyzers from analyzing the given tree. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

public:
 System::Threading::Tasks::Task<System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ GetAnalyzerSyntaxDiagnosticsAsync(Microsoft::CodeAnalysis::SyntaxTree ^ tree, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

Parameters

tree
SyntaxTree

Syntax tree to analyze.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

Returns syntax diagnostics produced by given analyzers from analyzing the given tree. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

public:
 System::Threading::Tasks::Task<System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ GetAnalyzerSyntaxDiagnosticsAsync(Microsoft::CodeAnalysis::SyntaxTree ^ tree, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostics::DiagnosticAnalyzer ^> analyzers, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

Parameters

tree
SyntaxTree

Syntax tree to analyze.

analyzers
ImmutableArray<DiagnosticAnalyzer>

Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of CompilationWithAnalyzers.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

Returns syntax diagnostics produced by all Analyzers from analyzing the given tree, optionally scoped to a filterSpan. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree or filter span, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

Parameters

tree
SyntaxTree

Syntax tree to analyze.

filterSpan
Nullable<TextSpan>

Optional filter span to analyze within the tree.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

Returns syntax diagnostics produced by given analyzers from analyzing the given tree, optionally scoped to a filterSpan. Depending on analyzers' behavior, returned diagnostics can have locations outside the tree or filter span, and some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, filterSpan As Nullable(Of TextSpan), analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

Parameters

tree
SyntaxTree

Syntax tree to analyze.

filterSpan
Nullable<TextSpan>

Optional filter span to analyze within the tree.

analyzers
ImmutableArray<DiagnosticAnalyzer>

Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of CompilationWithAnalyzers.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to