Ejemplo n.º 1
0
        public static void ForReadME2()
        {
            using var storage            = PortableStorage.Providers.FileStorgeProvider.CreateStorage(@"c:\temp", true, null);
            using var downloadController = DownloadController.Create(new DownloadControllerOptions()
            {
                Uri          = new Uri("https://abcd.com/file1.zip"),
                Storage      = storage,
                DownloadPath = "file1"
            });

            downloadController.Start().ContinueWith(x =>
            {
                Console.WriteLine("Single File Downloaded!");
            });

            while (downloadController.IsStarted)
            {
                Thread.Sleep(500);
            }
        }