Delegado SPLongOperation.BeginOperation
Define la firma de un delegado que inicia una operación de tipo long.
Espacio de nombres: Microsoft.SharePoint
Ensamblado: Microsoft.SharePoint (en Microsoft.SharePoint.dll)
Sintaxis
'Declaración
Public Delegate Sub BeginOperation ( _
longOperation As SPLongOperation _
)
'Uso
Dim instance As New BeginOperation(AddressOf HandlerMethod)
public delegate void BeginOperation(
SPLongOperation longOperation
)
Parámetros
longOperation
Tipo: Microsoft.SharePoint.SPLongOperationUn objeto que representa una operación larga.
Comentarios
Puede usar este método de delegado con el método estático SPLongOperation.Begin(SPLongOperation.BeginOperation) , tal como se muestra en el ejemplo siguiente:
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