DownloadMedia() public method

public DownloadMedia ( ) : void
return void
        static void Main(string[] args)
        {
            // TODO: Parameterize the event portion

            //------------------------------------------------------------------------------------
            // Reference
            //------------------------------------------------------------------------------------
            // Build 2017
            // https://s.ch9.ms/Events/Build/2017/RSS
            // Build 2015
            // https://channel9.msdn.com/Events/Build/2015/RSS
            // Azure Con
            // https://channel9.msdn.com/Events/Microsoft-Azure/AzureCon-2015/RSS
            // Cortana Analytics
            // https://channel9.msdn.com/Events/Cortana-Analytics-Suite/CA-Suite-Workshop-10-11SEP15/RSS
            //------------------------------------------------------------------------------------

            Arguments arguments = ParseArgs(args);

            if (arguments == null)
            {
                return;
            }

            Downloader d = new Downloader(
                arguments.DestinationPath,
                arguments.BaseUrl,
                arguments.MediaType,
                arguments.TitlesHasCode);

            var startTime = DateTime.Now;

            Console.WriteLine(string.Format("Starting download of {0} files \nfrom {1}\nSaving to {2}",
                                            arguments.MediaType,
                                            arguments.BaseUrl,
                                            arguments.DestinationPath
                                            ));
            Console.WriteLine(startTime);

            d.DownloadMedia();

            Console.WriteLine("Done!");
            Console.WriteLine("Started: " + startTime);
            Console.WriteLine("Finished: " + DateTime.Now);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // TODO: Parameterize the event portion

            //------------------------------------------------------------------------------------
            // Reference
            //------------------------------------------------------------------------------------
            // Build 2015
            // https://channel9.msdn.com/Events/Build/2015/RSS
            // Azure Con
            // https://channel9.msdn.com/Events/Microsoft-Azure/AzureCon-2015/RSS
            // Cortana Analytics
            // https://channel9.msdn.com/Events/Cortana-Analytics-Suite/CA-Suite-Workshop-10-11SEP15/RSS
            //------------------------------------------------------------------------------------

            Arguments arguments = ParseArgs(args);

            if (arguments == null)
            {
                return;
            }

            Downloader d = new Downloader(
                                            arguments.DestinationPath,
                                            arguments.BaseUrl,
                                            arguments.MediaType,
                                            arguments.TitlesHasCode);

            var startTime = DateTime.Now;

            Console.WriteLine(string.Format("Starting download of {0} files \nfrom {1}\nSaving to {2}",
                arguments.MediaType,
                arguments.BaseUrl,
                arguments.DestinationPath
               ));
            Console.WriteLine(startTime);

            d.DownloadMedia();

            Console.WriteLine("Done!");
            Console.WriteLine("Started: " + startTime);
            Console.WriteLine("Finished: " + DateTime.Now);

            Console.ReadLine();
        }