Sdílet prostřednictvím


CompilationWithAnalyzers.ClearAnalyzerState Method

Definition

Caution

This API is no longer required to be invoked. Analyzer state is automatically cleaned up when CompilationWithAnalyzers instance is released.

This method should be invoked when the analyzer host is disposing off the given analyzers. It clears the cached internal state (supported descriptors, registered actions, exception handlers, etc.) for analyzers.

public:
 static void ClearAnalyzerState(System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostics::DiagnosticAnalyzer ^> analyzers);
[System.Obsolete("This API is no longer required to be invoked. Analyzer state is automatically cleaned up when CompilationWithAnalyzers instance is released.")]
public static void ClearAnalyzerState (System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers);
[<System.Obsolete("This API is no longer required to be invoked. Analyzer state is automatically cleaned up when CompilationWithAnalyzers instance is released.")>]
static member ClearAnalyzerState : System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> -> unit
Public Shared Sub ClearAnalyzerState (analyzers As ImmutableArray(Of DiagnosticAnalyzer))

Parameters

analyzers
ImmutableArray<DiagnosticAnalyzer>

Analyzers whose state needs to be cleared.

Attributes

Applies to