1 instantiation of CookieTempDataProvider
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
403return new CookieTempDataProvider(
52 references to CookieTempDataProvider
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
TempDataInCookiesTest.cs (5)
70setCookieValues = setCookieValues.Where(cookie => cookie.Contains(CookieTempDataProvider.CookieName)); 98.FirstOrDefault(setCookieHeader => setCookieHeader.Name == CookieTempDataProvider.CookieName); 131.FirstOrDefault(setCookieHeaderValue => setCookieHeaderValue.Name == CookieTempDataProvider.CookieName); 154.FirstOrDefault(setCookieHeaderValue => setCookieHeaderValue.Name == CookieTempDataProvider.CookieName); 184.FirstOrDefault(setCookieHeaderValue => setCookieHeaderValue.Name == CookieTempDataProvider.CookieName);
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
437Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType);
Microsoft.AspNetCore.Mvc.ViewFeatures (13)
CookieTempDataProvider.cs (2)
32/// Initializes a new instance of <see cref="CookieTempDataProvider"/>. 45_logger = loggerFactory.CreateLogger<CookieTempDataProvider>();
CookieTempDataProviderOptions.cs (4)
10/// Provides programmatic configuration for cookies set by <see cref="CookieTempDataProvider"/> 16Name = CookieTempDataProvider.CookieName, 36/// Determines the settings used to create the cookie in <see cref="CookieTempDataProvider"/>. 47/// <see cref="CookieTempDataProvider"/>, then either set this property to <c>true</c> or
DependencyInjection\MvcViewFeaturesMvcBuilderExtensions.cs (3)
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>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (33)
CookieTempDataProviderTest.cs (20)
33var tempDataProvider = GetProvider(dataProtector: null, options: new CookieTempDataProviderOptions() 57var tempDataProvider = GetProvider(); 76var tempDataProvider = GetProvider(dataProtector.Object); 82context.Request.Headers.Cookie = $"{CookieTempDataProvider.CookieName}={base64AndUrlEncodedDataInCookie}"; 91Assert.Equal(CookieTempDataProvider.CookieName, setCookieHeader.Name.ToString()); 102var tempDataProvider = GetProvider(dataProtector); 104httpContext.Request.Headers.Cookie = $"{CookieTempDataProvider.CookieName}={base64AndUrlEncodedDataInCookie}"; 123var tempDataProvider = GetProvider(dataProtector); 134var cookieInfo = responseCookies[CookieTempDataProvider.CookieName]; 158var tempDataProvider = GetProvider(dataProtector, options); 170var cookieInfo = responseCookies[CookieTempDataProvider.CookieName]; 194var tempDataProvider = GetProvider(dataProtector); 205var cookieInfo = responseCookies[CookieTempDataProvider.CookieName]; 234var tempDataProvider = GetProvider( 254var cookieInfo = responseCookies[CookieTempDataProvider.CookieName]; 273var tempDataProvider = GetProvider(dataProtector); 274var requestCookies = $"{CookieTempDataProvider.CookieName}={base64AndUrlEncodedData}"; 287Assert.Equal(CookieTempDataProvider.CookieName, cookie.Name.AsSpan()); 297var testProvider = GetProvider(); 389private CookieTempDataProvider GetProvider(IDataProtector dataProtector = null, CookieTempDataProviderOptions options = null)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (4)
46Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 75Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 105Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 120Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType);
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensionsTest.cs (9)
24Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 39Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 70Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 102Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 118Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 134Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 150Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 166Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType); 182Assert.Equal(typeof(CookieTempDataProvider), descriptor.ImplementationType);