SPLongOperation.BeginOperation delegate
定義開始長時間作業的委派的簽章。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Delegate Sub BeginOperation ( _
longOperation As SPLongOperation _
)
'用途
Dim instance As New BeginOperation(AddressOf HandlerMethod)
public delegate void BeginOperation(
SPLongOperation longOperation
)
參數
longOperation
Type: Microsoft.SharePoint.SPLongOperation表示長時間作業的物件。
備註
下列範例所示,您可以使用靜態SPLongOperation.Begin(SPLongOperation.BeginOperation)方法中,使用這個委派方法:
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