예제 #1
0
        public async void CheckUrl(string url)
        {
            ProccessIsDone = false;
            MyStopWatch.Restart();
            WebRequest  webRequest = WebRequest.Create(url);
            WebResponse response   = await webRequest.GetResponseAsync();

            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
            {
                string numberOfCharacters = await reader.ReadToEndAsync();

                UrlSize = $"The Size Of Your Site Is: {numberOfCharacters.Length.ToString()} Bytes.";
            }
            ProccessIsDone = true;
            MyStopWatch.Stop();
        }