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