CompilationWithAnalyzers Constructors
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
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. |
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, CancellationToken) |
Obsolete.
Creates a new compilation by attaching diagnostic analyzers to an existing compilation. |
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions)
- Source:
- CompilationWithAnalyzers.cs
- Source:
- CompilationWithAnalyzers.cs
Creates a new compilation by attaching diagnostic analyzers to an existing compilation.
public CompilationWithAnalyzers (Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions? options);
new Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
Public Sub New (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), options As AnalyzerOptions)
Parameters
- compilation
- Compilation
The original compilation.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
The set of analyzers to include in future analyses.
- options
- AnalyzerOptions
Options that are passed to analyzers.
Applies to
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, CompilationWithAnalyzersOptions)
- 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
Creates a new compilation by attaching diagnostic analyzers to an existing compilation.
public:
CompilationWithAnalyzers(Microsoft::CodeAnalysis::Compilation ^ compilation, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostics::DiagnosticAnalyzer ^> analyzers, Microsoft::CodeAnalysis::Diagnostics::CompilationWithAnalyzersOptions ^ analysisOptions);
public CompilationWithAnalyzers (Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions analysisOptions);
new Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzersOptions -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
Public Sub New (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), analysisOptions As CompilationWithAnalyzersOptions)
Parameters
- compilation
- Compilation
The original compilation.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
The set of analyzers to include in future analyses.
- analysisOptions
- CompilationWithAnalyzersOptions
Options to configure analyzer execution.
Applies to
CompilationWithAnalyzers(Compilation, ImmutableArray<DiagnosticAnalyzer>, AnalyzerOptions, 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
Caution
Use constructor without a cancellation token
Creates a new compilation by attaching diagnostic analyzers to an existing compilation.
public:
CompilationWithAnalyzers(Microsoft::CodeAnalysis::Compilation ^ compilation, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostics::DiagnosticAnalyzer ^> analyzers, Microsoft::CodeAnalysis::Diagnostics::AnalyzerOptions ^ options, System::Threading::CancellationToken cancellationToken);
public CompilationWithAnalyzers (Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions options, System.Threading.CancellationToken cancellationToken);
public CompilationWithAnalyzers (Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions? options, System.Threading.CancellationToken cancellationToken);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("Use constructor without a cancellation token")]
public CompilationWithAnalyzers (Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions? options, System.Threading.CancellationToken cancellationToken);
new Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
[<System.Obsolete("Use constructor without a cancellation token")>]
new Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers : Microsoft.CodeAnalysis.Compilation * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * Microsoft.CodeAnalysis.Diagnostics.AnalyzerOptions * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers
Public Sub New (compilation As Compilation, analyzers As ImmutableArray(Of DiagnosticAnalyzer), options As AnalyzerOptions, cancellationToken As CancellationToken)
Parameters
- compilation
- Compilation
The original compilation.
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
The set of analyzers to include in future analyses.
- options
- AnalyzerOptions
Options that are passed to analyzers.
- cancellationToken
- CancellationToken
A cancellation token that can be used to abort analysis.
- Attributes