SPThreadPool.QueueUserWorkItemWithUserToken Method
Queues a method for execution by using the specified user token.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared Function QueueUserWorkItemWithUserToken ( _
callback As WaitCallback, _
state As Object, _
token As SPUserToken _
) As Boolean
'Usage
Dim callback As WaitCallback
Dim state As Object
Dim token As SPUserToken
Dim returnValue As Boolean
returnValue = SPThreadPool.QueueUserWorkItemWithUserToken(callback, _
state, token)
public static bool QueueUserWorkItemWithUserToken(
WaitCallback callback,
Object state,
SPUserToken token
)
Parameters
callback
Type: System.Threading.WaitCallbackA [T:System.Threading.][WaitCallback] delegate that represents the method to execute.
state
Type: System.ObjectAn object that contains data to be used by the method.
token
Type: Microsoft.SharePoint.SPUserTokenAn SPUserToken object that represents the token that identifies the authentication process applied to a user.
Return Value
Type: System.Boolean
true if the method is successfully queued; otherwise, false.