Example #1
0
        public HttpCookie SetCookie(string name, string value)
        {
            if (name == null)
                throw new ArgumentNullException ("name");
            if (value == null)
                throw new ArgumentNullException ("value");

            var cookie = new HttpCookie (name, value);

            SetCookie (name, cookie);
            return cookie;
        }
Example #2
0
        public HttpCookie SetCookie(string name, string value, string domain, DateTime expires)
        {
            if (name == null)
                throw new ArgumentNullException ("name");
            if (value == null)
                throw new ArgumentNullException ("value");

            var cookie = new HttpCookie (name, value);

            cookie.Domain = domain;
            cookie.Expires = expires;

            SetCookie (name, cookie);
            return cookie;
        }
Example #3
0
 public void SetCookie(string name, HttpCookie cookie)
 {
     Cookies [name] = cookie;
 }