private TFSRepository GetRepoFromServer(BaseTeamFoundationServer server, FilePath path) { foreach (var collection in server.ProjectCollections) { var workspaces = WorkspaceHelper.GetLocalWorkspaces(collection); var workspace = workspaces.SingleOrDefault(w => w.IsLocalPathMapped(path)); if (workspace != null) { var result = new TFSRepository(workspace.VersionControlService, path); result.AttachWorkspace(workspace); return(result); } } return(null); }
private TFSRepository GetRepoFromServer(TeamFoundationServer server, FilePath path) { foreach (var collection in server.ProjectCollections) { var workspaces = WorkspaceHelper.GetLocalWorkspaces(collection); var workspace = workspaces.SingleOrDefault(w => w.IsLocalPathMapped(path)); if (workspace != null) { var result = new TFSRepository(workspace.VersionControlService, path); result.AttachWorkspace(workspace); return result; } } return null; }