Namespace CryptoHives.Foundation.Threading.Analyzers
Classes
- AsyncValueTaskBoxingAnalyzer
Detects async methods returning
ValueTaskwhose only job is to await and forward a single innerValueTask, where the state machine the compiler generates is either pure overhead (CHT011) or a heap allocation the surrounding cleanup is paying for (CHT012).
- AsyncValueTaskBoxingCodeFixProvider
Provides code fixes for RedundantAsyncForwarding (CHT011), which removes the async modifier and returns the awaited
ValueTaskdirectly, and for AsyncWrapperBoxesStateMachine (CHT012), which pools the state machine box.
- DiagnosticDescriptors
Contains all diagnostic descriptors for the ValueTask analyzers.
- DiagnosticIds
Contains all diagnostic IDs for the ValueTask analyzers.
- SemaphoreSlimAsAsyncLockAnalyzer
Analyzer that detects
new SemaphoreSlim(1, 1)used as an async-compatible exclusive lock and suggests replacing it withAsyncLock.
- SemaphoreSlimAsAsyncLockCodeFixProvider
Provides a code fix for SemaphoreSlimAsAsyncLock (CHT009) that replaces
new SemaphoreSlim(1, 1)withnew AsyncLock()and adds the requiredusingdirective.
- ValueTaskMisuseAnalyzer
Analyzer that detects common ValueTask misuse patterns.
- ValueTaskMisuseCodeFixProvider
Provides code fixes for ValueTask misuse patterns detected by ValueTaskMisuseAnalyzer.