Beispiel #1
0
 /// <summary>
 ///     Update the cookie with name cookieName and new value newValue
 /// </summary>
 /// <param name="cookieName"></param>
 /// <param name="newValue"></param>
 public void Update(string cookieName, string newValue)
 {
     var newCookie = new Cookie
     {
         Name = cookieName,
         Value = newValue
     };
     Remove(cookieName);
     Add(newCookie);
 }
Beispiel #2
0
 /// <summary>
 ///     Add a new Cookie
 /// </summary>
 /// <param name="cookie"></param>
 public void Add(Cookie cookie)
 {
     _cookies.Add(cookie);
 }
Beispiel #3
0
 /// <summary>
 ///     Update the cookie with the new value newValue
 /// </summary>
 /// <param name="cookie"></param>
 /// <param name="newValue"></param>
 public void Update(Cookie cookie, string newValue)
 {
     Cookie newCookie = cookie;
     newCookie.Value = newValue;
     Remove(cookie.Name);
     Add(newCookie);
 }