Locks the current data connection.
Namespace: Microsoft.VisualStudio.Data.Services
Assembly: Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)
Syntax
'宣言
Function Lock ( _
lockTimeout As Integer _
) As Boolean
'使用
Dim instance As IVsDataConnection
Dim lockTimeout As Integer
Dim returnValue As Boolean
returnValue = instance.Lock(lockTimeout)
bool Lock(
int lockTimeout
)
bool Lock(
int lockTimeout
)
function Lock(
lockTimeout : int
) : boolean
Parameters
lockTimeout
Type: System.Int32The amount of time, in seconds, to wait for the data connection to lock before returning.
Return Value
Type: System.Boolean
A Boolean value indicating whether the lock was successful within the specified time-out period.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.