Class DiagnosticDescriptors
- Namespace
- CryptoHives.Foundation.Threading.Analyzers
- Assembly
- CryptoHives.Foundation.Threading.Analyzers.dll
Contains all diagnostic descriptors for the ValueTask analyzers.
public static class DiagnosticDescriptors
- Inheritance
-
DiagnosticDescriptors
- Inherited Members
Fields
AsTaskStoredBeforeSignal
CHT007: ValueTask.AsTask() stored before signaling.
public static readonly DiagnosticDescriptor AsTaskStoredBeforeSignal
Field Value
AsyncWrapperBoxesStateMachine
CHT012: async ValueTask wrapper boxes a state machine on every suspension.
public static readonly DiagnosticDescriptor AsyncWrapperBoxesStateMachine
Field Value
BlockingGetResult
CHT002: ValueTask.GetAwaiter().GetResult() used (blocking).
public static readonly DiagnosticDescriptor BlockingGetResult
Field Value
CapturedInClosure
CHT010: ValueTask captured in lambda/closure.
public static readonly DiagnosticDescriptor CapturedInClosure
Field Value
DirectResultAccess
CHT005: ValueTask.Result accessed directly.
public static readonly DiagnosticDescriptor DirectResultAccess
Field Value
MultipleAwait
CHT001: ValueTask consumed multiple times.
public static readonly DiagnosticDescriptor MultipleAwait
Field Value
Remarks
Worded as "consumed" rather than "awaited" because that is what the rule actually detects: a
ValueTask is consumed by await, by AsTask(), by Preserve() and by
GetAwaiter().GetResult() alike, and any second consumption in any combination is reported
here. Saying "awaited" misdescribed code that, for instance, only calls AsTask() twice.
NotConsumed
CHT008: ValueTask not consumed.
public static readonly DiagnosticDescriptor NotConsumed
Field Value
RedundantAsyncForwarding
CHT011: async method only forwards an awaited ValueTask.
public static readonly DiagnosticDescriptor RedundantAsyncForwarding
Field Value
SemaphoreSlimAsAsyncLock
CHT009: SemaphoreSlim(1, 1) used as an async lock.
public static readonly DiagnosticDescriptor SemaphoreSlimAsAsyncLock
Field Value
StoredInField
CHT003: ValueTask stored in field.
public static readonly DiagnosticDescriptor StoredInField