IBackupService
Ecng.Backup
The interface describing online data storage service.
Implementa: IDisposable
Propiedades
CanExpirable
public bool CanExpirable { get; }
value = iBackupService.CanExpirable
Is expirable publishing feature available (via CancellationToken) with expiresIn).
CanFolders
public bool CanFolders { get; }
value = iBackupService.CanFolders
Is folders feature available.
CanPartialDownload
public bool CanPartialDownload { get; }
value = iBackupService.CanPartialDownload
Is partial download feature available.
CanPublish
public bool CanPublish { get; }
value = iBackupService.CanPublish
Is publishing feature available.
Métodos
CreateFolder
public Task CreateFolder(BackupEntry entry, CancellationToken cancellationToken)
result = iBackupService.CreateFolder(entry, cancellationToken)
Create folder on the service.
- entry
- Folder to create.
- cancellationToken
- Cancellation token.
Devuelve: A task that represents the asynchronous operation.
DeleteAsync
public Task DeleteAsync(BackupEntry entry, CancellationToken cancellationToken)
result = iBackupService.DeleteAsync(entry, cancellationToken)
Delete file from the service.
- entry
- Element.
- cancellationToken
- CancellationToken
Devuelve: Task
DownloadAsync
public Task DownloadAsync(BackupEntry entry, Stream stream, long? offset, long? length, Action<int> progress, CancellationToken cancellationToken)
result = iBackupService.DownloadAsync(entry, stream, offset, length, progress, cancellationToken)
Download file.
- entry
- Element.
- stream
- The stream to write downloaded data into.
- offset
- Optional offset to start downloading from.
- length
- Optional length to download.
- progress
- Progress notification.
- cancellationToken
- CancellationToken
Devuelve: Task
FillInfoAsync
public Task FillInfoAsync(BackupEntry entry, CancellationToken cancellationToken)
result = iBackupService.FillInfoAsync(entry, cancellationToken)
Fill file info.
- entry
- Element.
- cancellationToken
- CancellationToken
Devuelve: Task
FindAsync
public IAsyncEnumerable<BackupEntry> FindAsync(BackupEntry parent, string criteria)
result = iBackupService.FindAsync(parent, criteria)
Find files by the specified criteria.
- parent
- Parent element. Can be null.
- criteria
- Criteria.
Devuelve: File list.
PublishAsync
public Task<string> PublishAsync(BackupEntry entry, TimeSpan? expiresIn, CancellationToken cancellationToken)
result = iBackupService.PublishAsync(entry, expiresIn, cancellationToken)
Get public url for the specified element.
- entry
- Element.
- expiresIn
- Link expiration. If null, means infinite.
- cancellationToken
- CancellationToken
Devuelve: Public url.
UnPublishAsync
public Task UnPublishAsync(BackupEntry entry, CancellationToken cancellationToken)
result = iBackupService.UnPublishAsync(entry, cancellationToken)
Remove public url for the specified element.
- entry
- Element.
- cancellationToken
- CancellationToken
Devuelve: Task
UploadAsync
public Task UploadAsync(BackupEntry entry, Stream stream, Action<int> progress, CancellationToken cancellationToken)
result = iBackupService.UploadAsync(entry, stream, progress, cancellationToken)
Upload file.
- entry
- Element.
- stream
- The stream to read data from for uploading.
- progress
- Progress notification.
- cancellationToken
- CancellationToken
Devuelve: Task