Class SemaphoreSlimAsAsyncLockAnalyzer
- Namespace
- CryptoHives.Foundation.Threading.Analyzers
- Assembly
- CryptoHives.Foundation.Threading.Analyzers.dll
Analyzer that detects new SemaphoreSlim(1, 1) used as an async-compatible exclusive lock
and suggests replacing it with AsyncLock.
[DiagnosticAnalyzer("C#", new string[] { })]
public sealed class SemaphoreSlimAsAsyncLockAnalyzer : DiagnosticAnalyzer
- Inheritance
-
SemaphoreSlimAsAsyncLockAnalyzer
- Inherited Members
Properties
SupportedDiagnostics
Returns a set of descriptors for the diagnostics that this analyzer is capable of producing.
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
Property Value
Methods
Initialize(AnalysisContext)
Called once at session start to register actions in the analysis context.
public override void Initialize(AnalysisContext context)
Parameters
contextAnalysisContext