VersionControlServer.GetWorkspace Method (String, String)

Gets the Workspace associated with the specified name and owner.

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

Syntax

'Declaration
Public Function GetWorkspace ( _
    workspaceName As String, _
    workspaceOwner As String _
) As Workspace
public Workspace GetWorkspace(
    string workspaceName,
    string workspaceOwner
)
public:
Workspace^ GetWorkspace(
    String^ workspaceName, 
    String^ workspaceOwner
)
member GetWorkspace : 
        workspaceName:string * 
        workspaceOwner:string -> Workspace
public function GetWorkspace(
    workspaceName : String, 
    workspaceOwner : String
) : Workspace

Parameters

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.Workspace
The Workspace that is associated with the specified name and owner.

Exceptions

Exception Condition
ItemNotMappedException

Thrown if no Workspace is found associated with the specified WorkspaceInfo.

Remarks

This method searches all known workspaces on the current computer to identify a workspace that has explicitly or implicitly mapped the provided local path. If no workspace is found, this method throws an ItemNotMappedException.

.NET Framework Security

See Also

Reference

VersionControlServer Class

GetWorkspace Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace