共用方式為


SPFile.RefreshLock Method

Renews an existing lock on the file.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub RefreshLock ( _
    lockId As String, _
    timeout As TimeSpan _
)
'Usage
Dim instance As SPFile
Dim lockId As String
Dim timeout As TimeSpan

instance.RefreshLock(lockId, timeout)
public void RefreshLock(
    string lockId,
    TimeSpan timeout
)

Parameters

  • lockId
    Type: System.String

    The identifier (ID) of the current lock.

  • timeout
    Type: System.TimeSpan

    Specifies the duration for which the lock will be refreshed.

Exceptions

Exception Condition
SPException

An error occurred while refreshing the lock.

See Also

Reference

SPFile Class

SPFile Members

Microsoft.SharePoint Namespace

ReleaseLock(String)