SPFile.ConvertLock 方法

将该文件上的现有锁转换为新类型的锁。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
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
    类型:System.String

    当前的锁定标识符 (ID)。

异常

异常 条件
SPFileLockException

使用fromType或toType参数的值是None

SPException

将锁转换时出错。

备注

既不fromType参数的值,也不toType参数的值应为 null 。

另请参阅

引用

SPFile 类

SPFile 成员

Microsoft.SharePoint 命名空间

SPFile.SPLockType

LockedByUser