Exemplo n.º 1
0
        static void Main(string[] args)
        {
            PackageCacher cacher = new PackageCacher();

            cacher.SkippingFile    += cacher_SkippingFile;
            cacher.DownloadingFile += cacher_DownloadingFile;
            cacher.DownloadFailed  += cacher_DownloadFailed;

            try
            {
                var arguments = ArgumentParser.ParseArguments(args);
                CreateDirectoryIfNonExistent(arguments.Directory);
                cacher.CachePackage(arguments.PackageName, arguments.Directory, arguments.Variables);
            }
            catch (Exception ex)
            {
                WriteError(ex.ToString());
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            PackageCacher cacher = new PackageCacher();

            cacher.SkippingFile    += cacher_SkippingFile;
            cacher.DownloadingFile += cacher_DownloadingFile;
            cacher.DownloadFailed  += cacher_DownloadFailed;

            try
            {
                var arguments = ParseArguments(args);

                if (arguments != null)
                {
                    cacher.CachePackage(arguments.Directory, arguments.Url, arguments.CacheDir);
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.ToString());
            }
        }