Workspace.SetLock Method (String, LockLevel, RecursionType)
Applies the selected lock level to the specified path.
Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
Syntax
'宣告
Public Function SetLock ( _
path As String, _
lockLevel As LockLevel, _
recursion As RecursionType _
) As Integer
public int SetLock(
string path,
LockLevel lockLevel,
RecursionType recursion
)
public:
int SetLock(
String^ path,
LockLevel lockLevel,
RecursionType recursion
)
member SetLock :
path:string *
lockLevel:LockLevel *
recursion:RecursionType -> int
public function SetLock(
path : String,
lockLevel : LockLevel,
recursion : RecursionType
) : int
Parameters
- path
Type: System.String
The path on which to set the lock.
- lockLevel
Type: Microsoft.TeamFoundation.VersionControl.Client.LockLevel
The lock level to apply.
- recursion
Type: Microsoft.TeamFoundation.VersionControl.Client.RecursionType
A flag specifying the type of recursion.
Return Value
Type: System.Int32
The number of locks that are set.
.NET Framework Security
- 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.