public bool Start(string sourceFile, string destinationFile, GZipModes gZipMode) { try { var gZiper = _gZipFactory.GetGZiper(this, gZipMode); return(gZiper.Execute(sourceFile, destinationFile)); } catch (Exception ex) { IsCancelled = true; return(false); } }
public GZip GetGZiper(GZipController gZipController, GZipModes gZipMode) { switch (gZipMode) { case GZipModes.Compress: return(new GZipCompressor(gZipController)); case GZipModes.Decompress: return(new GZipDecompressor(gZipController)); default: return(null); } }