共用方式為


SPThreadPool.QueueUserWorkItemWithImpersonation Method

Queues a method for execution by using the identity of the remote user.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared Function QueueUserWorkItemWithImpersonation ( _
    callback As WaitCallback, _
    state As Object _
) As Boolean
'Usage
Dim callback As WaitCallback
Dim state As Object
Dim returnValue As Boolean

returnValue = SPThreadPool.QueueUserWorkItemWithImpersonation(callback, _
    state)
public static bool QueueUserWorkItemWithImpersonation(
    WaitCallback callback,
    Object state
)

Parameters

  • state
    Type: System.Object

    An object that contains data to be used by the method.

Return Value

Type: System.Boolean
true if the method is successfully queued; otherwise, false.

See Also

Reference

SPThreadPool Class

SPThreadPool Members

Microsoft.SharePoint.Utilities Namespace