public void Run() { if (!canRun) { ioDevice.Print("The application is already running. Press any key to quit"); ioDevice.ReadKey(); return; } var startDictionary = new Dictionary <string, int>() { { startPage, 0 } }; WriteReferencesRecursively(startDictionary, 0); ioDevice.Print("Completed"); ioDevice.ReadKey(); }
public async Task <string> DownloadPage(string url) { try { string responseBody = await httpClient.GetStringAsync(url); return(responseBody); } catch (HttpRequestException e) { ioDevice.Print(e.Message); return(null); } }