TryGetWorkspace Method
This documentation is archived and is not being maintained.

VersionControlServer.TryGetWorkspace Method

Gets the workspace for the given path.

Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in microsoft.teamfoundation.versioncontrol.client.dll)

public Workspace TryGetWorkspace (
	string localPath
public Workspace TryGetWorkspace (
	String localPath
public function TryGetWorkspace (
	localPath : String
) : Workspace



A local path for which a workspace is desired.

This is similar to GetWorkspace. However, if the path is not in any known local workspace, TryGetWorkspace returns a null reference (Nothing in Visual Basic) instead of throwing an exception.

© 2016 Microsoft