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); 39Assert.True(_context.TryGet(out Thing? stored)); 46Assert.True(_context.TryGet(out Thing? stored)); 53Assert.Null(_context.Get()); 61Assert.False(_context.TryGet(out Thing? stored)); 71Assert.Throws<InvalidOperationException>(() => _context.Set(value)); 78Assert.Throws<InvalidOperationException>(() => _context.Get()); 88_context.Set(value); 90Assert.True(_context.TryGet(out Thing? stored)); 100Assert.Null(_context.Get());