IFRCloudFilesProvider.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System.Threading.Tasks;
  2. using FastReport.Cloud.FastReport.Models;
  3. namespace FastReport.Cloud.FastReport
  4. {
  5. internal interface IFRCloudFilesProvider
  6. {
  7. FilesVM GetFoldersAndFiles(string folderId, SearchOptions options = null);
  8. #if ASYNC
  9. Task<FilesVM> GetFoldersAndFilesAsync(string folderId, SearchOptions options = null);
  10. #endif
  11. FileVM Create(string folderId, FileCreateVM fileCreate);
  12. #if ASYNC
  13. Task<FileVM> CreateAsync(string folderId, FileCreateVM fileCreate);
  14. #endif
  15. FileVM CreateFolder(string folderId, FolderCreateVM folderCreate);
  16. #if ASYNC
  17. Task<FileVM> CreateFolderAsync(string folderId, FolderCreateVM folderCreate);
  18. #endif
  19. FileVM Rename(FileVM folderOrFile, RenameVM newName);
  20. #if ASYNC
  21. Task<FileVM> RenameAsync(FileVM folderOrFile, RenameVM newName);
  22. #endif
  23. void Resave(string id, FileCreateVM updatedFile);
  24. #if ASYNC
  25. Task ResaveAsync(string id, FileCreateVM updatedFile);
  26. #endif
  27. FileResponse Download(string id);
  28. #if ASYNC
  29. Task<FileResponse> DownloadAsync(string id);
  30. #endif
  31. void Delete(FileVM folderOrFile);
  32. #if ASYNC
  33. Task DeleteAsync(FileVM folderOrFile);
  34. #endif
  35. FileVM GetFile(string id);
  36. #if ASYNC
  37. Task<FileVM > GetFileAsync(string id);
  38. #endif
  39. }
  40. }