Пример #1
0
        protected override string Mine(string url, CancellationToken token)
        {
            var h = new FastWebClient()
            {
                Timeout = -1
            };

            return(attemptparse(h.DownloadString(new Uri(url))));
        }
Пример #2
0
        private static bool OpenReadToGoogle() {
            try {
                var _onlinechecker = new FastWebClient() { Timeout = 5000 };

                using (_onlinechecker.OpenRead("http://www.google.com")) { }
                return true;
            } catch (Exception) {
                return false;
            }
        }
Пример #3
0
        private static bool OpenReadToGoogle()
        {
            try {
                var _onlinechecker = new FastWebClient()
                {
                    Timeout = 5000
                };

                using (_onlinechecker.OpenRead("http://www.google.com")) { }
                return(true);
            } catch (Exception) {
                return(false);
            }
        }