SPLongOperation.BeginOperation delegate
Define a assinatura de um representante que começa uma operação longa.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaração
Public Delegate Sub BeginOperation ( _
longOperation As SPLongOperation _
)
'Uso
Dim instance As New BeginOperation(AddressOf HandlerMethod)
public delegate void BeginOperation(
SPLongOperation longOperation
)
Parâmetros
longOperation
Type: Microsoft.SharePoint.SPLongOperationUm objeto que representa uma operação longa.
Comentários
Você pode usar esse método de representante com o método estático SPLongOperation.Begin(SPLongOperation.BeginOperation) , conforme mostrado no exemplo a seguir:
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