Exemple #1
0
 public static void ZipProject(string zipFileName, string fileToZip, bool excludeSZReadme, bool removeSourceControl)
 {
     using (var controller = new SolZipController(zipFileName, excludeSZReadme, removeSourceControl))
     {
         controller.ZipProject(fileToZip);
     }
 }
Exemple #2
0
        public static void Zip(string zipFileName, string fileToZip, bool excludeSZReadme, bool removeSourceControl)
        {
            using (var controller = new SolZipController(zipFileName, excludeSZReadme, removeSourceControl))
            {
                switch (GetZipFileSuffix(fileToZip))
                {
                case SolZipConstants.SolutionSuffix:
                    controller.ZipSolution(fileToZip);
                    break;

                case SolZipConstants.ProjectSuffix:
                    controller.ZipProject(fileToZip);
                    break;

                case SolZipConstants.ItemSuffix:
                    controller.ZipFile(fileToZip);
                    break;

                default:
                    throw new ArgumentException("Suffix of file to zip not reqcognized", "fileToZip");
                }
            }
        }