예제 #1
0
 public static void ZipSolution(string zipFileName, string fileToZip, bool excludeSZReadme, bool removeSourceControl)
 {
     using (var controller = new SolZipController(zipFileName, excludeSZReadme, removeSourceControl))
     {
         controller.ZipSolution(fileToZip);
     }
 }
예제 #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");
                }
            }
        }