internal static T unwrap <T>(SupplierWithException <T, IOException> supplier) { try { return(supplier.get()); } catch (PassThroughException exception) { throw exception._exception; } }
internal static T wrap <T>(SupplierWithException <T, IOException> supplier) { try { return(supplier.get()); } catch (IOException exception) { throw new PassThroughException(exception); } }
internal static string streamToBase64(SupplierWithException <InputStream, IOException> streamSupplier) { using (var stream = streamSupplier.get().Stream) { return(streamToBase64(stream)); } }