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