Table of Contents

Class DiagnosticIds

Namespace
CryptoHives.Foundation.Threading.Analyzers
Assembly
CryptoHives.Foundation.Threading.Analyzers.dll

Contains all diagnostic IDs for the ValueTask analyzers.

public static class DiagnosticIds
Inheritance
DiagnosticIds
Inherited Members

Fields

AsTaskStoredBeforeSignal

ValueTask.AsTask() stored before signaling can cause performance issues.

public const string AsTaskStoredBeforeSignal = "CHT007"

Field Value

string

AsyncWrapperBoxesStateMachine

async ValueTask wrapper boxes a state machine whenever it suspends.

public const string AsyncWrapperBoxesStateMachine = "CHT012"

Field Value

string

BlockingGetResult

ValueTask.GetAwaiter().GetResult() used (blocking).

public const string BlockingGetResult = "CHT002"

Field Value

string

CapturedInClosure

ValueTask captured in lambda/closure.

public const string CapturedInClosure = "CHT010"

Field Value

string

DirectResultAccess

ValueTask.Result accessed directly (blocking and potential misuse).

public const string DirectResultAccess = "CHT005"

Field Value

string

MultipleAwait

ValueTask awaited multiple times.

public const string MultipleAwait = "CHT001"

Field Value

string

NotConsumed

ValueTask not awaited or converted to Task.

public const string NotConsumed = "CHT008"

Field Value

string

RedundantAsyncForwarding

async ValueTask method only forwards an awaited ValueTask; return it directly.

public const string RedundantAsyncForwarding = "CHT011"

Field Value

string

SemaphoreSlimAsAsyncLock

SemaphoreSlim(1, 1) used as an async lock; replace with AsyncLock.

public const string SemaphoreSlimAsAsyncLock = "CHT009"

Field Value

string

StoredInField

ValueTask stored in field (potential double consumption).

public const string StoredInField = "CHT003"

Field Value

string