SPLongOperation.BeginOperation - Délégué
Définit la signature d'un délégué qui commence une longue opération.
Espace de noms : Microsoft.SharePoint
Assembly : Microsoft.SharePoint (dans Microsoft.SharePoint.dll)
Syntaxe
'Déclaration
Public Delegate Sub BeginOperation ( _
longOperation As SPLongOperation _
)
'Utilisation
Dim instance As New BeginOperation(AddressOf HandlerMethod)
public delegate void BeginOperation(
SPLongOperation longOperation
)
Paramètres
longOperation
Type : Microsoft.SharePoint.SPLongOperationUn objet qui représente une opération longue.
Remarques
Vous pouvez utiliser cette méthode de délégué avec la méthode statique SPLongOperation.Begin(SPLongOperation.BeginOperation) , comme illustré dans l'exemple suivant :
SPLongOperation.Begin(
delegate(SPLongOperation longOperation)
{
// Do something that takes a long time to complete.
// Inform the server that the work is done
// and that the page used to indicate progress
// is no longer needed.
longOperation.End("default.aspx");
}
);
' Do something that takes a long time to complete.
' Inform the server that the work is done
' and that the page used to indicate progress
' is no longer needed.
SPLongOperation.Begin(Function(longOperation) AnonymousMethod1(longOperation))
Private Function AnonymousMethod1(ByVal longOperation As SPLongOperation) As Object
longOperation.End("default.aspx")
Return Nothing
End Function