-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
30 lines (26 loc) · 822 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Net;
namespace DotNet40TLSThumbprintPinning
{
internal class Program
{
public static void Main(string[] args)
{
new DownloadingShowcase().UseDownloadManager();
Console.WriteLine("Done");
Console.ReadLine();
}
}
internal class DownloadingShowcase
{
private readonly DownloadManager _downloadManager = new DownloadManager();
public void UseDownloadManager()
{
// Add a sample download to perform
_downloadManager.AddRequest(new HttpDownloadRequest("ExampleDownload.zip",
() => (HttpWebRequest) WebRequest.Create("https://github.com/Jofairden/DotNet40TLSThumbprintPinning/releases/download/1.0/ExampleDownload.zip"),
() => { Console.WriteLine("I finished downloading ExampleDownload.zip!"); }));
_downloadManager.DownloadFilesFromQueue();
}
}
}