共用方式為


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
)

參數

  • fromLockId
    Type: System.String

    識別項 (ID) 目前的鎖定。

Exceptions

Exception Condition
SPFileLockException

fromType或toType參數的值是None

SPException

轉換鎖定時發生錯誤。

備註

不fromType參數的值,也不toType參數的值應該是 null 。

請參閱

參照

SPFile class

SPFile members

Microsoft.SharePoint namespace

SPFile.SPLockType

LockedByUser