WaitForDocumentUnlockActivity.IsDocumentLocked Method
Determines whether a document is locked.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Protected Overridable Function IsDocumentLocked ( _
file As SPFile, _
currentUser As SPUser _
) As Boolean
'Usage
Dim file As SPFile
Dim currentUser As SPUser
Dim returnValue As Boolean
returnValue = Me.IsDocumentLocked(file, _
currentUser)
protected virtual bool IsDocumentLocked(
SPFile file,
SPUser currentUser
)
Parameters
file
Type: Microsoft.SharePoint.SPFileThe document to be checked.
currentUser
Type: Microsoft.SharePoint.SPUserThe current user.
Return Value
Type: System.Boolean
true if the document is locked; otherwise, false.
Remarks
This method returns false if the file is not locked and not checked out or checked out by the current user from the server; otherwise, this method returns true.
See Also
Reference
WaitForDocumentUnlockActivity Class