Share via


CompilationWithAnalyzers.GetAnalysisResultAsync Method

Definition

Overloads

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

Returns an AnalysisResult populated with SyntaxDiagnostics produced by given analyzers from analyzing the given tree, 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.

GetAnalysisResultAsync(SemanticModel, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Returns an AnalysisResult populated with SemanticDiagnostics 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.

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by given analyzers from analyzing the given additional file, optionally scoped to a filterSpan. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

GetAnalysisResultAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Returns an AnalysisResult populated with SyntaxDiagnostics produced by given analyzers from analyzing the given tree. Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

GetAnalysisResultAsync(SemanticModel, Nullable<TextSpan>, CancellationToken)

Returns an AnalysisResult populated with SemanticDiagnostics 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.

GetAnalysisResultAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

Returns an AnalysisResult populated with SyntaxDiagnostics produced by all Analyzers from analyzing the given tree, 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.

GetAnalysisResultAsync(AdditionalText, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by given analyzers from analyzing the given additional file. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

GetAnalysisResultAsync(ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Executes the given analyzers and returns the corresponding AnalysisResult with all diagnostics and telemetry info.

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, CancellationToken)

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by all Analyzers from analyzing the given additional file, optionally scoped to a filterSpan. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

GetAnalysisResultAsync(SyntaxTree, CancellationToken)

Returns an AnalysisResult populated with SyntaxDiagnostics produced by all Analyzers from analyzing the given tree. Depending on analyzers' behavior, some diagnostics that would be reported for the tree by an analysis of the complete compilation can be absent.

GetAnalysisResultAsync(AdditionalText, CancellationToken)

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by all Analyzers from analyzing the given additional file. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

GetAnalysisResultAsync(CancellationToken)

Executes all Analyzers and returns the corresponding AnalysisResult with all diagnostics and telemetry info.

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

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

Returns an AnalysisResult populated with SyntaxDiagnostics produced by given analyzers from analyzing the given tree, 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<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SyntaxTree tree, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SyntaxTree * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (tree As SyntaxTree, filterSpan As Nullable(Of TextSpan), analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

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

GetAnalysisResultAsync(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

Returns an AnalysisResult populated with SemanticDiagnostics 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<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SemanticModel model, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SemanticModel * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (model As SemanticModel, filterSpan As Nullable(Of TextSpan), analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

model
SemanticModel

Semantic model representing the syntax tree to analyze.

filterSpan
Nullable<TextSpan>

An optional span within the tree to scope analysis.

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

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

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

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by given analyzers from analyzing the given additional file, optionally scoped to a filterSpan. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

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

Parameters

file
AdditionalText

Additional file to analyze.

filterSpan
Nullable<TextSpan>

Optional filter span to analyze within the file.

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

GetAnalysisResultAsync(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

Returns an AnalysisResult populated with SyntaxDiagnostics produced by given analyzers from analyzing the given tree. 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<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (tree As SyntaxTree, analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

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

GetAnalysisResultAsync(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

Returns an AnalysisResult populated with SemanticDiagnostics 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<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SemanticModel model, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SemanticModel * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (model As SemanticModel, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

model
SemanticModel

Semantic model representing the syntax tree to analyze.

filterSpan
Nullable<TextSpan>

An optional span within the tree to scope analysis.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalysisResultAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

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

Returns an AnalysisResult populated with SyntaxDiagnostics produced by all Analyzers from analyzing the given tree, 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<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SyntaxTree tree, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SyntaxTree * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (tree As SyntaxTree, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

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

GetAnalysisResultAsync(AdditionalText, 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

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by given analyzers from analyzing the given additional file. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.AdditionalText file, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.AdditionalText * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (file As AdditionalText, analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

file
AdditionalText

Additional file 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

GetAnalysisResultAsync(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
Source:
CompilationWithAnalyzers.cs

Executes the given analyzers and returns the corresponding AnalysisResult with all diagnostics and telemetry info.

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

Parameters

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, CancellationToken)

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

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by all Analyzers from analyzing the given additional file, optionally scoped to a filterSpan. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.AdditionalText file, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.AdditionalText * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (file As AdditionalText, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

file
AdditionalText

Additional file to analyze.

filterSpan
Nullable<TextSpan>

Optional filter span to analyze within the file.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalysisResultAsync(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

Returns an AnalysisResult populated with SyntaxDiagnostics produced by all Analyzers from analyzing the given tree. 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<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (tree As SyntaxTree, cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

tree
SyntaxTree

Syntax tree to analyze.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalysisResultAsync(AdditionalText, 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

Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by all Analyzers from analyzing the given additional file. The given file must be part of AdditionalFiles for the AnalysisOptions for this CompilationWithAnalyzers instance. Depending on analyzers' behavior, some diagnostics that would be reported for the file by an analysis of the complete compilation can be absent.

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.AdditionalText file, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.AdditionalText * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (file As AdditionalText, cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

file
AdditionalText

Additional file to analyze.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to

GetAnalysisResultAsync(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
Source:
CompilationWithAnalyzers.cs

Executes all Analyzers and returns the corresponding AnalysisResult with all diagnostics and telemetry info.

public:
 System::Threading::Tasks::Task<Microsoft::CodeAnalysis::Diagnostics::AnalysisResult ^> ^ GetAnalysisResultAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (cancellationToken As CancellationToken) As Task(Of AnalysisResult)

Parameters

cancellationToken
CancellationToken

Returns

Applies to