private void SetArchiveFormat(FileArchiveFormat archiveFormat) { string format; switch (archiveFormat) { case FileArchiveFormat.Tar: format = "tar"; break; case FileArchiveFormat.TarGz: format = "tar.gz"; break; case FileArchiveFormat.TarBz2: format = "tar.bz2"; break; default: throw new ArgumentException("Not supported archive format."); } TryAddQueryParam("extract-archive-v2", format); }