Inheritance: Microsoft.TeamFoundation.VersionControl.Client.Repository
        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);
        }
Exemplo n.º 2
0
        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;
        }