IVsFileBackup2.BackupFileAsync Method
Backs up the file asynchronously.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.12.0 (in Microsoft.VisualStudio.Shell.Interop.12.0.dll)
Syntax
'Declaration
Function BackupFileAsync ( _
szBackupFileName As String _
) As IVsTask
IVsTask BackupFileAsync(
string szBackupFileName
)
IVsTask^ BackupFileAsync(
[InAttribute] String^ szBackupFileName
)
abstract BackupFileAsync :
szBackupFileName:string -> IVsTask
function BackupFileAsync(
szBackupFileName : String
) : IVsTask
Parameters
szBackupFileName
Type: StringThe backup file name.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsTask
The asynchronous task.
Remarks
This method asynchronously persists the object to a single file. It must not perform I/O on the UI thread, it must not prevent further change to the object while it is running, and it must persist the state the object had at the time it was called. It must not modify any internal state, but should record the fact that the current version has been backed up. BackupFileAsync() must return either E_STG_S_DATALOSS or STG_E_INVALIDCODEPAGE if it cannot persist to a file without data loss. BackupFileAsync() may return E_UNEXPECTED if it is called while a previous backup of the object is still in progress.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.