コード例 #1
0
ファイル: SolZipHelper.cs プロジェクト: Jeern/SolZip
 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
ファイル: SolZipHelper.cs プロジェクト: Jeern/SolZip
        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");
                }
            }
        }