CompilationWithAnalyzers Class
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.
public ref class CompilationWithAnalyzers
public class CompilationWithAnalyzers
type CompilationWithAnalyzers = class
Public Class CompilationWithAnalyzers
- Inheritance
-
CompilationWithAnalyzers
Constructors
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken) |
Obsolete.
Creates a new compilation by attaching diagnostic analyzers to an existing compilation. |
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions) |
Creates a new compilation by attaching diagnostic analyzers to an existing compilation. |
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions) |
Creates a new compilation by attaching diagnostic analyzers to an existing compilation. |
Properties
AnalysisOptions |
Options to configure analyzer execution. |
Analyzers |
Analyzers to execute on the compilation. |
CancellationToken |
Obsolete.
An optional cancellation token which can be used to cancel analysis. Note: This token is only used if the API invoked to get diagnostics doesn't provide a cancellation token. |
Compilation |
Underlying Compilation with a non-null Microsoft.CodeAnalysis.Compilation.EventQueue, used to drive analyzer execution. |
Methods
ClearAnalyzerState(ImmutableArray<DiagnosticAnalyzer>) |
Obsolete.
This method should be invoked when the analyzer host is disposing off the given |
GetAllDiagnosticsAsync() |
Returns all diagnostics produced by compilation and by all Analyzers. |
GetAllDiagnosticsAsync(CancellationToken) |
Returns all diagnostics produced by compilation and by all Analyzers. |
GetAnalysisResultAsync(AdditionalText, CancellationToken) |
Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by all Analyzers from analyzing the given additional |
GetAnalysisResultAsync(AdditionalText, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by given |
GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, CancellationToken) |
Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by all Analyzers from analyzing the given additional |
GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns an AnalysisResult populated with AdditionalFileDiagnostics produced by given |
GetAnalysisResultAsync(CancellationToken) |
Executes all Analyzers and returns the corresponding AnalysisResult with all diagnostics and telemetry info. |
GetAnalysisResultAsync(ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Executes the given |
GetAnalysisResultAsync(SemanticModel, Nullable<TextSpan>, CancellationToken) |
Returns an AnalysisResult populated with SemanticDiagnostics produced by all Analyzers from analyzing the given |
GetAnalysisResultAsync(SemanticModel, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns an AnalysisResult populated with SemanticDiagnostics produced by the given |
GetAnalysisResultAsync(SyntaxTree, CancellationToken) |
Returns an AnalysisResult populated with SyntaxDiagnostics produced by all Analyzers from analyzing the given |
GetAnalysisResultAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns an AnalysisResult populated with SyntaxDiagnostics produced by given |
GetAnalysisResultAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken) |
Returns an AnalysisResult populated with SyntaxDiagnostics produced by all Analyzers
from analyzing the given |
GetAnalysisResultAsync(SyntaxTree, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns an AnalysisResult populated with SyntaxDiagnostics produced by given |
GetAnalyzerCompilationDiagnosticsAsync(CancellationToken) |
Obsolete.
Returns diagnostics produced by compilation actions of all Analyzers. |
GetAnalyzerCompilationDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Obsolete.
Returns diagnostics produced by compilation actions of given |
GetAnalyzerDiagnosticsAsync() |
Returns diagnostics produced by all Analyzers. |
GetAnalyzerDiagnosticsAsync(CancellationToken) |
Returns diagnostics produced by all Analyzers. |
GetAnalyzerDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns diagnostics produced by given |
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 |
GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, CancellationToken) |
Returns syntax diagnostics produced by all Analyzers from analyzing the given |
GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns syntax diagnostics produced by given |
GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken) |
Returns syntax diagnostics produced by all Analyzers from analyzing the given |
GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
Returns syntax diagnostics produced by given |
GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer, CancellationToken) |
Gets telemetry info for the given analyzer, such as count of registered actions, the total execution time (if LogAnalyzerExecutionTime is true), etc. |
GetEffectiveDiagnostics(IEnumerable<Diagnostic>, Compilation) |
Given a set of compiler or DiagnosticAnalyzer generated
|
GetEffectiveDiagnostics(ImmutableArray<Diagnostic>, Compilation) |
Given a set of compiler or DiagnosticAnalyzer generated
|
IsDiagnosticAnalyzerSuppressed(DiagnosticAnalyzer, CompilationOptions, Action<Exception,DiagnosticAnalyzer,Diagnostic>) |
Obsolete.
Returns true if all the diagnostics that can be produced by this analyzer are suppressed through options. |