1 write to _context
Microsoft.AspNetCore.AsyncState.Tests (1)
AsyncContextHttpContextOfTTests.cs (1)
28
_context
= serviceProvider.GetRequiredService<IAsyncContext<Thing>>();
10 references to _context
Microsoft.AspNetCore.AsyncState.Tests (10)
AsyncContextHttpContextOfTTests.cs (10)
37
_context
.Set(value);
39
Assert.True(
_context
.TryGet(out Thing? stored));
46
Assert.True(
_context
.TryGet(out Thing? stored));
53
Assert.Null(
_context
.Get());
61
Assert.False(
_context
.TryGet(out Thing? stored));
71
Assert.Throws<InvalidOperationException>(() =>
_context
.Set(value));
78
Assert.Throws<InvalidOperationException>(() =>
_context
.Get());
88
_context
.Set(value);
90
Assert.True(
_context
.TryGet(out Thing? stored));
100
Assert.Null(
_context
.Get());