Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPFile.ConvertLock Method

Converts an existing lock on the file to a new type of lock.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public void ConvertLock(
	SPFile.SPLockType fromType,
	SPFile.SPLockType toType,
	string fromLockId,
	string toLockId,
	TimeSpan newTimeout
)

Parameters

fromType
Type: Microsoft.SharePoint.SPFile.SPLockType
The current type of lock on the file.
toType
Type: Microsoft.SharePoint.SPFile.SPLockType
The type of lock to be placed on the file.
fromLockId
Type: System.String
The identifier (ID) for the current lock.
toLockId
Type: System.String
The ID for the new lock.
newTimeout
Type: System.TimeSpan
The desired duration for the new lock.
ExceptionCondition
SPFileLockException

The value of the fromType or toType parameter is None.

SPException

An error occurred while converting the lock.

Neither the value of the fromType parameter nor the value of the toType parameter should be null .

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.