public static System.Net.Cookie ToCookie(this HttpCookie httpCookie)
{
var to = new System.Net.Cookie(httpCookie.Name, httpCookie.Value, httpCookie.Path)
{
Expires = httpCookie.Expires,
Secure = httpCookie.Secure,
HttpOnly = httpCookie.HttpOnly,
};
if (httpCookie.Domain != null)
to.Domain = httpCookie.Domain;
return to;
}
}