Example #1
0
        public GalleryTokenCollection GetGalleryTokens(GalleryFileSearchOption options)
        {
            IAsyncResult asyncResult = this.BeginGetGalleryTokens(options, null);

            asyncResult.AsyncWaitHandle.WaitOne();
            return(this.EndGetGalleryTokens(asyncResult));
        }
Example #2
0
        public IAsyncResult BeginGetGalleryTokens(GalleryFileSearchOption options, AsyncCallback callBack, object userState)
        {
            string boundary;

            byte[] buff = options.ToByteArray(out boundary);

            WebRequest wReq = WebRequest.Create("http://ul.exhentai.org/image_lookup.php");

            wReq.Proxy  = this.Proxy;
            wReq.Method = "POST";
            wReq.Headers.Set("cookie", this.m_cookie);
            wReq.ContentType = String.Format("multipart/form-data; boundary={0}", boundary);

            return(new ApiResult(wReq, buff, ExHentai.KeyGalleryToken, callBack, userState));
        }
Example #3
0
 public GalleryTokenCollection GetGalleryTokens(GalleryFileSearchOption options)
 {
     IAsyncResult asyncResult = this.BeginGetGalleryTokens(options, null);
     asyncResult.AsyncWaitHandle.WaitOne();
     return this.EndGetGalleryTokens(asyncResult);
 }
Example #4
0
        public IAsyncResult BeginGetGalleryTokens(GalleryFileSearchOption options, AsyncCallback callBack, object userState)
        {
            string boundary;
            byte[] buff = options.ToByteArray(out boundary);

            WebRequest wReq = WebRequest.Create("http://ul.exhentai.org/image_lookup.php");
            wReq.Proxy = this.Proxy;
            wReq.Method = "POST";
            wReq.Headers.Set("cookie", this.m_cookie);
            wReq.ContentType = String.Format("multipart/form-data; boundary={0}", boundary);

            return new ApiResult(wReq, buff, ExHentai.KeyGalleryToken, callBack, userState);
        }
Example #5
0
 public IAsyncResult BeginGetGalleryTokens(GalleryFileSearchOption options, AsyncCallback callBack)
 {
     return this.BeginGetGalleryTokens(options, callBack, null);
 }
Example #6
0
 public IAsyncResult BeginGetGalleryTokens(GalleryFileSearchOption options, AsyncCallback callBack)
 {
     return(this.BeginGetGalleryTokens(options, callBack, null));
 }