Table of Contents

Namespace CryptoHives.Foundation.Threading.Analyzers

Classes

AsyncValueTaskBoxingAnalyzer

Detects async methods returning ValueTask whose only job is to await and forward a single inner ValueTask, 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 ValueTask directly, 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 with AsyncLock.

SemaphoreSlimAsAsyncLockCodeFixProvider

Provides a code fix for SemaphoreSlimAsAsyncLock (CHT009) that replaces new SemaphoreSlim(1, 1) with new AsyncLock() and adds the required using directive.

ValueTaskMisuseAnalyzer

Analyzer that detects common ValueTask misuse patterns.

ValueTaskMisuseCodeFixProvider

Provides code fixes for ValueTask misuse patterns detected by ValueTaskMisuseAnalyzer.