Exemple #1
0
        public static string GetRepoURLFromWorkspace(WorkspaceInfo wkInfo)
        {
            if (wkInfo == null)
            {
                return(null);
            }

            WorkspaceStatusString.Data wkStatusData =
                WorkspaceStatusString.GetSelectorData(wkInfo);

            string repositoryName = wkStatusData.RepositoryName;
            string server         = wkStatusData.Server;

            if (string.IsNullOrEmpty(repositoryName) || string.IsNullOrEmpty(server))
            {
                return(null);
            }

            string orgName       = GetOrgNameFromServer(server);
            string plasticHubURL = GetPlasticHubServer(server);

            if (string.IsNullOrEmpty(orgName) || string.IsNullOrEmpty(plasticHubURL))
            {
                return(null);
            }

            return(string.Format("{0}/{1}/{2}",
                                 plasticHubURL,
                                 orgName,
                                 repositoryName));
        }
        static string GetTitle(WorkspaceInfo wkInfo)
        {
            WorkspaceStatusString.Data wkStatusData =
                WorkspaceStatusString.GetSelectorData(wkInfo);

            return(string.Format("{0} {1} @ {2} @ {3}",
                                 wkStatusData.ObjectName,
                                 wkStatusData.ObjectSpec,
                                 wkStatusData.RepositoryName,
                                 wkStatusData.Server));
        }
Exemple #3
0
 static WorkspaceStatusString.Data GetWorkspaceStatus(WorkspaceInfo wkInfo)
 {
     return(WorkspaceStatusString.GetSelectorData(wkInfo));
 }