IBackupHelperExtensions.PerformBackupAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Runs PerformBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor) on a thread pool thread.
public static System.Threading.Tasks.Task PerformBackupAsync(this Android.App.Backup.IBackupHelper self, Android.OS.ParcelFileDescriptor? oldState, Android.App.Backup.BackupDataOutput? data, Android.OS.ParcelFileDescriptor? newState);
static member PerformBackupAsync : Android.App.Backup.IBackupHelper * Android.OS.ParcelFileDescriptor * Android.App.Backup.BackupDataOutput * Android.OS.ParcelFileDescriptor -> System.Threading.Tasks.Task
Parameters
- self
- IBackupHelper
The backup helper on which to call PerformBackup.
- oldState
- ParcelFileDescriptor
The read-only descriptor containing this helper's previous backup state, or null if no previous state is available.
- data
- BackupDataOutput
The output to which the helper writes the backup data.
- newState
- ParcelFileDescriptor
The open descriptor at which the helper writes its new backup state.
Returns
A task that represents completion of the helper's PerformBackup call.
Remarks
This .NET wrapper uses Task.Run to call the synchronous method. Await the task before reusing or disposing of the supplied objects, invoking another helper, or returning from the backup callback.
The helper must not close or seek the state descriptors. Read only the state saved by this helper, so that later helpers can read their own state.
.NET extension task wrapper implementation and Android backup helper contract.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.