38 references to CookieHeaderValue
Microsoft.AspNetCore.Authentication.Test (5)
TwitterTests.cs (3)
216var cookie = new CookieHeaderValue(setCookieValue.Name, setCookieValue.Value); 266var cookie = new CookieHeaderValue(setCookieValue.Name, setCookieValue.Value); 373var cookie = new CookieHeaderValue(setCookieValue.Name, setCookieValue.Value);
WsFederation\WsFederationTest.cs (1)
269request.Headers.Add(HeaderNames.Cookie, new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
WsFederation\WsFederationTest_Handler.cs (1)
267request.Headers.Add(HeaderNames.Cookie, new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
Microsoft.AspNetCore.Http (1)
Features\RequestCookiesFeature.cs (1)
86headers.Add(new CookieHeaderValue(pair.Key, pair.Value).ToString());
Microsoft.AspNetCore.Localization.Tests (5)
CookieRequestCultureProviderTest.cs (4)
66client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", value).ToString()); 116client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", "uic=ar-SA").ToString()); 215client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", $"c={culture}|uic={uiCulture}").ToString()); 275client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", $"c={culture}|uic={uiCulture}").ToString());
RequestLocalizationMiddlewareTest.cs (1)
67client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", $"c={requestedCulture}|uic={requestedCulture}").ToString());
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
TempDataInCookiesUsingCookieConsentTest.cs (1)
116request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
TempDataPropertyTest.cs (1)
169request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
TempDataTestBase.cs (1)
272request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
ViewEngineTests.cs (2)
165new CookieHeaderValue(CookieRequestCultureProvider.DefaultCookieName, cultureCookie).ToString()); 309new CookieHeaderValue(CookieRequestCultureProvider.DefaultCookieName, cultureCookie).ToString());
Microsoft.AspNetCore.Session.Tests (5)
SessionTests.cs (5)
204client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 264client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 322client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 426client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 496"Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
Microsoft.Net.Http.Headers (2)
CookieHeaderParser.cs (1)
30cookieValue = new CookieHeaderValue(parsedName.Value, parsedValue.Value);
CookieHeaderValue.cs (1)
32: this(name, StringSegment.Empty)
Microsoft.Net.Http.Headers.Tests (15)
CookieHeaderValueTest.cs (15)
13var header1 = new CookieHeaderValue("name1", "n1=v1&n2=v2&n3=v3"); 16var header2 = new CookieHeaderValue("name2", ""); 19var header3 = new CookieHeaderValue("name3", "value3"); 22var header4 = new CookieHeaderValue("name4", "\"value4\""); 83var header1 = new CookieHeaderValue("name1", "n1=v1&n2=v2&n3=v3"); 86var header2 = new CookieHeaderValue("name2", "value2"); 89var header3 = new CookieHeaderValue("name3", "value3"); 92var header4 = new CookieHeaderValue("name4", "\"value4\""); 115var header1 = new CookieHeaderValue("name1", "n1=v1&n2=v2&n3=v3"); 118var header2 = new CookieHeaderValue("name2", "value2"); 121var header3 = new CookieHeaderValue("name3", "value3"); 154Assert.Throws<ArgumentNullException>(() => new CookieHeaderValue(null, "value")); 161Assert.Throws<ArgumentException>(() => new CookieHeaderValue(name, "value")); 168Assert.Throws<ArgumentException>(() => new CookieHeaderValue("name", value)); 185var header = new CookieHeaderValue(name, value);