SPFile.ConvertLock method
將現存的鎖定檔案轉換成新的鎖定類型。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub ConvertLock ( _
fromType As SPFile.SPLockType, _
toType As SPFile.SPLockType, _
fromLockId As String, _
toLockId As String, _
newTimeout As TimeSpan _
)
'用途
Dim instance As SPFile
Dim fromType As SPFile.SPLockType
Dim toType As SPFile.SPLockType
Dim fromLockId As String
Dim toLockId As String
Dim newTimeout As TimeSpan
instance.ConvertLock(fromType, toType, _
fromLockId, toLockId, newTimeout)
public void ConvertLock(
SPFile.SPLockType fromType,
SPFile.SPLockType toType,
string fromLockId,
string toLockId,
TimeSpan newTimeout
)
參數
fromType
Type: Microsoft.SharePoint.SPFile.SPLockType目前的檔案上的鎖定類型。
toType
Type: Microsoft.SharePoint.SPFile.SPLockType要放在檔案的鎖定類型。
fromLockId
Type: System.String識別項 (ID) 目前的鎖定。
toLockId
Type: System.String新的鎖定識別碼。
newTimeout
Type: System.TimeSpan新的鎖定所需的工期。
Exceptions
Exception | Condition |
---|---|
SPFileLockException | fromType或toType參數的值是None。 |
SPException | 轉換鎖定時發生錯誤。 |
備註
不fromType參數的值,也不toType參數的值應該是 null 。