Share via


SPBackupRestoreInformation.CurrentProgress - Propriété

Obtient ou définit, en pourcentage de l'ensemble du projet, le degré auquel l'opération de sauvegarde ou de restauration est terminée.

Espace de noms :  Microsoft.SharePoint.Administration.Backup
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Property CurrentProgress As Integer
    Get
    Set
'Utilisation
Dim instance As SPBackupRestoreInformation
Dim value As Integer

value = instance.CurrentProgress

instance.CurrentProgress = value
public int CurrentProgress { get; set; }

Valeur de propriété

Type : System.Int32
Un Int32 de 0 à 100.

Remarques

Définir cette propriété à 100 dans les implémentations de OnBackupComplete et OnPostRestore. Vous devez généralement définir également une valeur appropriée dans OnBackup et OnRestore. Implémentations de OnPrepareBackup et de OnPreRestore doivent également définir cette propriété si le code de ces implémentations prend beaucoup de temps.

Exemples

L'exemple suivant montre comment utiliser la propriété CurrentProgress dans une implémentation de 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

Voir aussi

Référence

SPBackupRestoreInformation classe

SPBackupRestoreInformation - Membres

Microsoft.SharePoint.Administration.Backup - Espace de noms

UpdateProgress