private void DecompressProject(string workDirectoryFullPath) { string projectDirectoryFullPath = Path.Combine(workDirectoryFullPath, ProjectName); if (storage.ExistsDirectory(projectDirectoryFullPath)) { throw new ProjArchiveException(Resources.Err_ProjectAlreadyExists); } logger.Info("Decompressing project: '{0}' into directory '{1}'", archiveFileFullPath, workDirectoryFullPath); fileCompressor.Decompress(archiveFileFullPath, workDirectoryFullPath); }
private static void Work() { var creator = new FileCompressorCreator(); using (IFileCompressor compressor = creator.Create()) { CompressionParams @params = CompressionParams.Instance; if (@params.Compress) { compressor.Compress(@params.InputFileName, @params.OutputFileName); } else { compressor.Decompress(@params.InputFileName, @params.OutputFileName); } } }