/// <summary> /// Распаковать файл из двоичного вида и сохранить /// </summary> public async Task <IResultValue <string> > UnzipFileAndSave(string filePath, byte[] fileByte) => await filePath.WhereContinueAsyncBind(_ => !String.IsNullOrEmpty(filePath) && fileByte != null, okFunc : _ => ExecuteTaskResultHandler.ExecuteBindResultValueAsync(() => FileFromByteZip(filePath, fileByte)), badFunc : _ => new ResultValue <string>(new ErrorCommon(ErrorConvertingType.FileNotSaved, $"Невозможно сохранить файл {filePath}")). Map(result => Task.FromResult((IResultValue <string>)result)));
/// <summary> /// Сохранить файл на диск из двоичного кода /// </summary> public async Task <IResultValue <string> > SaveFileFromByte(string filePath, byte[] fileByte) => await ExecuteTaskResultHandler.ExecuteBindResultValueAsync(() => FileToByte(filePath, fileByte));
/// <summary> /// Представить файл в двоичном виде и запаковать /// </summary> public async Task <IResultValue <byte[]> > FileToByteAndZip(string filePath) => await ExecuteTaskResultHandler.ExecuteBindResultValueAsync(() => FileToByteZip(filePath));