CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, CancellationToken) |
Returns semantic diagnostics produced by all Analyzers from analyzing the given |
GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns semantic diagnostics produced by the given |
GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, 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 semantic diagnostics produced by all Analyzers from analyzing the given model
, optionally scoped to a filterSpan
.
Depending on analyzers' behavior, 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 ^>> ^ GetAnalyzerSemanticDiagnosticsAsync(Microsoft::CodeAnalysis::SemanticModel ^ model, Nullable<Microsoft::CodeAnalysis::Text::TextSpan> filterSpan, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync (Microsoft.CodeAnalysis.SemanticModel model, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSemanticDiagnosticsAsync : Microsoft.CodeAnalysis.SemanticModel * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSemanticDiagnosticsAsync (model As SemanticModel, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))
Parameters
- model
- SemanticModel
Semantic model representing the syntax tree to analyze.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Applies to
GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, 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 semantic diagnostics produced by the given analyzers
from analyzing the given model
, optionally scoped to a filterSpan
.
Depending on analyzers' behavior, 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 ^>> ^ GetAnalyzerSemanticDiagnosticsAsync(Microsoft::CodeAnalysis::SemanticModel ^ model, Nullable<Microsoft::CodeAnalysis::Text::TextSpan> filterSpan, 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>> GetAnalyzerSemanticDiagnosticsAsync (Microsoft.CodeAnalysis.SemanticModel model, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSemanticDiagnosticsAsync : Microsoft.CodeAnalysis.SemanticModel * 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 GetAnalyzerSemanticDiagnosticsAsync (model As SemanticModel, filterSpan As Nullable(Of TextSpan), analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))
Parameters
- model
- SemanticModel
Semantic model representing the 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.