4 implementations of ITempDataProvider
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
CookieTempDataProvider.cs (1)
17public partial class CookieTempDataProvider : ITempDataProvider
SessionStateTempDataProvider.cs (1)
12public class SessionStateTempDataProvider : ITempDataProvider
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
TempDataDictionaryTest.cs (2)
180private class NullTempDataProvider : ITempDataProvider 192private class TestTempDataProvider : ITempDataProvider
73 references to ITempDataProvider
Microsoft.AspNetCore.Mvc.RazorPages.Test (7)
Filters\PageSaveTempDataPropertyFilterFactoryTest.cs (1)
35serviceCollection.AddSingleton(Mock.Of<ITempDataProvider>());
Filters\PageSaveTempDataPropertyFilterTest.cs (5)
21var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 48var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 84var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 127var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 165var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>())
Infrastructure\PageActionInvokerProviderTest.cs (1)
502.Returns((HttpContext context) => new TempDataDictionary(context, Mock.Of<ITempDataProvider>()));
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
436var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider));
Microsoft.AspNetCore.Mvc.ViewFeatures (17)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensions.cs (5)
59/// Registers <see cref="SessionStateTempDataProvider"/> as the default <see cref="ITempDataProvider"/> 71var descriptor = ServiceDescriptor.Singleton(typeof(ITempDataProvider), typeof(SessionStateTempDataProvider)); 78/// Registers <see cref="CookieTempDataProvider"/> as the default <see cref="ITempDataProvider"/> in the 90var descriptor = ServiceDescriptor.Singleton(typeof(ITempDataProvider), typeof(CookieTempDataProvider)); 97/// Registers <see cref="CookieTempDataProvider"/> as the default <see cref="ITempDataProvider"/> in the
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (4)
44/// Registers <see cref="CookieTempDataProvider"/> as the default <see cref="ITempDataProvider"/> in the 56var descriptor = ServiceDescriptor.Singleton(typeof(ITempDataProvider), typeof(CookieTempDataProvider)); 90/// Registers <see cref="CookieTempDataProvider"/> as the default <see cref="ITempDataProvider"/> in the 195services.TryAddSingleton<ITempDataProvider, CookieTempDataProvider>();
ITempDataDictionary.cs (2)
14/// Loads the dictionary by using the registered <see cref="ITempDataProvider"/>. 19/// Saves the dictionary by using the registered <see cref="ITempDataProvider"/>.
TempDataDictionary.cs (3)
24private readonly ITempDataProvider _provider; 33/// <param name="provider">The <see cref="ITempDataProvider"/> used to Load and Save data.</param> 34public TempDataDictionary(HttpContext context, ITempDataProvider provider)
TempDataDictionaryFactory.cs (3)
15private readonly ITempDataProvider _provider; 20/// <param name="provider">The <see cref="ITempDataProvider"/>.</param> 21public TempDataDictionaryFactory(ITempDataProvider provider)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (48)
ControllerTest.cs (12)
70TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 91TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 115TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 136TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 158TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 180TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 202TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 226TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 249TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 271TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 293TempData = new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()), 434var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>());
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (4)
45var descriptor = Assert.Single(builder.Services, item => item.ServiceType == typeof(ITempDataProvider)); 74var descriptor = Assert.Single(builder.Services, item => item.ServiceType == typeof(ITempDataProvider)); 104var descriptor = Assert.Single(builder.Services, item => item.ServiceType == typeof(ITempDataProvider)); 119var descriptor = Assert.Single(builder.Services, item => item.ServiceType == typeof(ITempDataProvider));
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensionsTest.cs (9)
23var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 38var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 69var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 101var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 117var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 133var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 149var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 165var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider)); 181var descriptor = Assert.Single(services, item => item.ServiceType == typeof(ITempDataProvider));
Filters\ControllerSaveTempDataPropertyFilterFactoryTest.cs (1)
31serviceCollection.AddSingleton(Mock.Of<ITempDataProvider>());
Filters\ControllerSaveTempDataPropertyFilterTest.cs (4)
19var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 65var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 108var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()) 151var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>());
Rendering\DefaultTemplatesUtilities.cs (1)
294Mock.Of<ITempDataProvider>()),
Rendering\ViewContextTests.cs (2)
26tempData: new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()), 53tempData: new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()),
TempDataDictionaryFactoryTest.cs (2)
48var provider = Mock.Of<ITempDataProvider>();
ViewComponentResultTest.cs (2)
31new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()); 676services.AddSingleton<ITempDataProvider, SessionStateTempDataProvider>();
ViewComponents\ContentViewComponentResultTest.cs (1)
46new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()),
ViewComponents\HtmlContentViewComponentResultTest.cs (1)
46new TempDataDictionary(actionContext.HttpContext, Mock.Of<ITempDataProvider>()),
ViewComponents\ViewComponentContextTest.cs (2)
24var tempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()); 91new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()),
ViewComponents\ViewViewComponentResultTest.cs (2)
23new TempDataDictionary(new DefaultHttpContext(), Mock.Of<ITempDataProvider>()); 526new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>()),
ViewComponentTests.cs (1)
243viewContext.TempData = new TempDataDictionary(httpContext, Mock.Of<ITempDataProvider>());
ViewExecutorTest.cs (3)
164var tempDataProvider = Mock.Of<ITempDataProvider>(); 401new TempDataDictionaryFactory(Mock.Of<ITempDataProvider>()),
ViewResultExecutorTest.cs (1)
355new TempDataDictionaryFactory(Mock.Of<ITempDataProvider>()),