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