次の方法で共有


SPLongOperation.BeginOperation delegate

Defines the signature for a delegate that begins a long operation.

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

Syntax

'Declaration
Public Delegate Sub BeginOperation ( _
    longOperation As SPLongOperation _
)
'Usage
Dim instance As New BeginOperation(AddressOf HandlerMethod)
public delegate void BeginOperation(
    SPLongOperation longOperation
)

Parameters

Remarks

You can use this delegate method with the static SPLongOperation.Begin(SPLongOperation.BeginOperation) method, as shown in the following example:

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

See also

Reference

Microsoft.SharePoint namespace

Begin(SPLongOperation.BeginOperation)