CompilationWithAnalyzers.ClearAnalyzerState 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.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈