public static void SetCookie(CookieContainer cookies, ExHentaiAccount account, string origin)
        {
            var uri          = new Uri($"https://{origin}/");
            var cookieOrigin = $".{origin}";

            account?.MemberId.ConsumeOwn(v => cookies.Add(uri, new Cookie("ipb_member_id", v, "/", cookieOrigin)));
            account?.PassHash.ConsumeOwn(v => cookies.Add(uri, new Cookie("ipb_pass_hash", v, "/", cookieOrigin)));
        }
        public static void SetCookie(WebRequestParameter parameter, ExHentaiAccount account)
        {
            var cookies = parameter.CookieContainer = new CookieContainer();

            if (account != null)
            {
                SetCookie(cookies, account, "e-hentai.org");
                SetCookie(cookies, account, "exhentai.org");
            }
        }
 public ExHentaiAccount(ExHentaiAccount other)
 {
     this.MemberId = other.MemberId;
     this.PassHash = other.PassHash;
 }
 public ExHentaiAgent(Site site, DownloadInput downloadInput, WebRequestProvider webRequestProvider, ExHentaiAccount account) : base(site, downloadInput, webRequestProvider)
 {
     this.Account = account != null ? new ExHentaiAccount(account) : null;
 }
 public static Func <WebRequestParameter> UnaryRequestParameter(Func <WebRequestParameter> func, ExHentaiAccount account)
 {
     return(() => func().ConsumeOwn(o => SetCookie(o, account)));
 }