1 instantiation of AsyncStateToken
Microsoft.Extensions.AsyncState (1)
AsyncState.cs (1)
49return new AsyncStateToken(Interlocked.Increment(ref _contextCount) - 1);
22 references to AsyncStateToken
Microsoft.Extensions.AsyncState (16)
AsyncContext.cs (1)
12private readonly AsyncStateToken _token;
AsyncState.cs (4)
47public AsyncStateToken RegisterAsyncContext() 52public bool TryGet(AsyncStateToken token, out object? value) 69public object? Get(AsyncStateToken token) 79public void Set(AsyncStateToken token, object? value)
AsyncStateToken.cs (7)
11public readonly struct AsyncStateToken : IEquatable<AsyncStateToken> 27return obj is AsyncStateToken token && Equals(token); 35public bool Equals(AsyncStateToken other) 55public static bool operator ==(AsyncStateToken left, AsyncStateToken right) 66public static bool operator !=(AsyncStateToken left, AsyncStateToken right)
IAsyncState.cs (4)
36bool TryGet(AsyncStateToken token, [MaybeNullWhen(false)] out object? value); 44object? Get(AsyncStateToken token); 52void Set(AsyncStateToken token, object? value); 58public AsyncStateToken RegisterAsyncContext();
Microsoft.Extensions.AsyncState.Tests (6)
AsyncStateTests.cs (1)
25static Task SetAsyncContext(AsyncState state, IThing context, AsyncStateToken token)
AsyncStateTokenTests.cs (5)
12var t1 = new AsyncStateToken(1); 13var t2 = new AsyncStateToken(1); 26var t1 = new AsyncStateToken(1); 27var t2 = new AsyncStateToken(2); 40var t1 = new AsyncStateToken(ind);