定义的签名代理人开始较长的操作。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Delegate Sub BeginOperation ( _
longOperation As SPLongOperation _
)
用法
Dim instance As New BeginOperation(AddressOf HandlerMethod)
public delegate void BeginOperation(
SPLongOperation longOperation
)
参数
longOperation
类型: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