共用方式為


IBackupRestore.OnBackupComplete method

提供文章備份處理。

Namespace:  Microsoft.SharePoint.Administration.Backup
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Function OnBackupComplete ( _
    sender As Object, _
    args As SPBackupInformation _
) As Boolean
'用途
Dim instance As IBackupRestore
Dim sender As Object
Dim args As SPBackupInformation
Dim returnValue As Boolean

returnValue = instance.OnBackupComplete(sender, _
    args)
bool OnBackupComplete(
    Object sender,
    SPBackupInformation args
)

參數

傳回值

Type: System.Boolean
true如果成功 ;否則,請false。

備註

在最低限度下,您實作應該將**CurrentProgess()**設為 100%,並傳回true。這通常是所有必要的。

在某些情況下,不需要修改後備份動作。例如, OnBackupComplete實作無法重新啟動已停止或暫停的備份作業的 Windows 服務。

如果OnBackup傳回falseOnBackupComplete方法不會執行。

Examples

以下顯示OnBackupComplete的最常見實作。

public Boolean OnBackupComplete(Object sender, SPBackupInformation args)
{
    if (args == null)
    {
        throw new ArgumentNullException("args");
    }
    args.CurrentProgress = 100;
    return true;
}
Public Function OnBackupComplete(ByVal sender As Object, ByVal args As SPBackupInformation) As Boolean
    If args Is Nothing Then
        Throw New ArgumentNullException("args")
    End If
    args.CurrentProgress = 100
    Return True
End Function

請參閱

參照

IBackupRestore interface

IBackupRestore members

Microsoft.SharePoint.Administration.Backup namespace