public Response Cookie(HttpCookie cookie, bool shareable = false) { cookie.ThrowIfNull("cookie"); _cookies.Add(new Cookie(cookie, shareable)); return(this); }
public Cookie(HttpCookie cookie, bool shareable = false) { cookie.ThrowIfNull("cookie"); _name = cookie.Name; _path = cookie.Path; _secure = cookie.Secure; _shareable = shareable; _httpOnly = cookie.HttpOnly; _domain = cookie.Domain; _expires = cookie.Expires; _value = cookie.Value; IEnumerable <CookieValue> cookieValues = cookie.Values.AllKeys .Where(arg => arg != null) .Select(arg => new CookieValue(arg, cookie.Values[arg])); _values.AddRange(cookieValues); }