/// <summary> /// Initializes a new instance of the <see cref="AsyncLocal{T}"/> class. /// </summary> public AsyncLocal() { #if ASYNCLOCAL this.asyncLocal = new System.Threading.AsyncLocal <T>(); #else if (LightUps <T> .IsAsyncLocalSupported) { this.asyncLocal = new AsyncLocal46(); } else { #if CALLCONTEXT this.asyncLocal = new AsyncLocalCallContext(); #else throw new NotSupportedException(); #endif } #endif }
/// <summary> /// Initializes a new instance of the <see cref="AsyncLocal{T}"/> class. /// </summary> public AsyncLocal() { this.asyncLocal = new System.Threading.AsyncLocal <T>(); }
private static void SetCurrentTest(HttpTest test) => _test = test;