Share via


SetModerationStatusActivity.IsDocumentLocked method

Checks if the specified document library item is locked or checked out.

Namespace:  Microsoft.SharePoint.WorkflowActions.WithKey
Assembly:  Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)

Syntax

'Declaration
Protected Overrides 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 override bool IsDocumentLocked(
    SPFile file,
    SPUser currentUser
)

Parameters

Return value

Type: System.Boolean
true if the list item is locked or checked out; otherwise, false.

Remarks

This override checks if the specified list item is locked or checked out.

If the file or currentUser is null , the ArgumentNullException will be thrown. If the file does not exist, the ArgumentException will be thrown.

See also

Reference

SetModerationStatusActivity class

SetModerationStatusActivity members

Microsoft.SharePoint.WorkflowActions.WithKey namespace