BattlelogMobile.Core.Service.DownloadService.GetFile C# (CSharp) Метод

GetFile() публичный Метод

public GetFile ( string url, string isolatedStorageFile ) : Task
url string
isolatedStorageFile string
Результат Task
        public async Task<bool> GetFile(string url, string isolatedStorageFile)
        {
            var client = new CookieAwareGZipWebClient(CookieJar);
            try
            {
                string responseStream = await client.DownloadStringTaskAsync(new Uri(url));
                using (var writer = new StreamWriter(_isolatedStorage.OpenFile(isolatedStorageFile, FileMode.Create)))
                    await writer.WriteAsync(responseStream);
                return true;
            }
            catch (WebException we)
            {
                Messenger.Default.Send(new NotificationMessage(this, we.Message));
            }
            return false;
        }
    }