This documentation is archived and is not being maintained.

Workspace::SetLock Method (array<String>, LockLevel, RecursionType, Boolean, array<String>)

Applies the selected lock level to the specified paths.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public:
int SetLock(
	array<String^>^ paths, 
	LockLevel lockLevel, 
	RecursionType recursion, 
	bool silent, 
	array<String^>^ itemAttributeFilters
)

Parameters

paths
Type: array<System::String>

The array of paths 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 that specifies the type of recursion.

silent
Type: System::Boolean

Specifies whether the server should return Get operations.

itemAttributeFilters
Type: array<System::String>

An array of versioned item properties to return with each Get operation.

Return Value

Type: System::Int32
The number of locks that are set.

Show: