1 instantiation of CookieTempDataProvider
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
403
return new
CookieTempDataProvider
(
52 references to CookieTempDataProvider
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
TempDataInCookiesTest.cs (5)
70
setCookieValues = 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)
437
Assert.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
"/>
16
Name =
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
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
>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (33)
CookieTempDataProviderTest.cs (20)
33
var
tempDataProvider = GetProvider(dataProtector: null, options: new CookieTempDataProviderOptions()
57
var
tempDataProvider = GetProvider();
76
var
tempDataProvider = GetProvider(dataProtector.Object);
82
context.Request.Headers.Cookie = $"{
CookieTempDataProvider
.CookieName}={base64AndUrlEncodedDataInCookie}";
91
Assert.Equal(
CookieTempDataProvider
.CookieName, setCookieHeader.Name.ToString());
102
var
tempDataProvider = GetProvider(dataProtector);
104
httpContext.Request.Headers.Cookie = $"{
CookieTempDataProvider
.CookieName}={base64AndUrlEncodedDataInCookie}";
123
var
tempDataProvider = GetProvider(dataProtector);
134
var cookieInfo = responseCookies[
CookieTempDataProvider
.CookieName];
158
var
tempDataProvider = GetProvider(dataProtector, options);
170
var cookieInfo = responseCookies[
CookieTempDataProvider
.CookieName];
194
var
tempDataProvider = GetProvider(dataProtector);
205
var cookieInfo = responseCookies[
CookieTempDataProvider
.CookieName];
234
var
tempDataProvider = GetProvider(
254
var cookieInfo = responseCookies[
CookieTempDataProvider
.CookieName];
273
var
tempDataProvider = GetProvider(dataProtector);
274
var requestCookies = $"{
CookieTempDataProvider
.CookieName}={base64AndUrlEncodedData}";
287
Assert.Equal(
CookieTempDataProvider
.CookieName, cookie.Name.AsSpan());
297
var
testProvider = GetProvider();
389
private
CookieTempDataProvider
GetProvider(IDataProtector dataProtector = null, CookieTempDataProviderOptions options = null)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (4)
46
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
75
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
105
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
120
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensionsTest.cs (9)
24
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
39
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
70
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
102
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
118
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
134
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
150
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
166
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);
182
Assert.Equal(typeof(
CookieTempDataProvider
), descriptor.ImplementationType);