Ejemplo n.º 1
0
		public FileSyncTfs(string username, string password, string domain)
		{
			_networkCredential = new NetworkCredential(username, password, domain);

			var applicationRootPath = HttpContext.Current.Server.MapPath("/");
			_workspaceInfo = Workstation.Current.GetLocalWorkspaceInfo(applicationRootPath);
			AssertWorkspace(_workspaceInfo, applicationRootPath);

			EnsureUpdateWorkspaceInfoCache();
		}
Ejemplo n.º 2
0
        internal Workspace(VersionControlServer versionControlServer, 
											 WorkspaceInfo info)
            : this()
        {
            this.versionControlServer = versionControlServer;
                this.name = info.Name;
                this.ownerName = info.OwnerName;
                this.comment = info.Comment;
                this.folders = new WorkingFolder[0];
                this.computer = info.Computer;
        }
Ejemplo n.º 3
0
		private void AssertWorkspace(WorkspaceInfo workspaceInfo, string filename)
		{
			if (workspaceInfo != null) return;
			throw new Exception("[Rainbow.Tfs] No workspace is available or defined for the path. Verify your ASP.NET impersonation credentials in IIS for local TFS cache access. File " + filename);
		}
        public bool TryGetLocalWorkspaceInfos(out WorkspaceInfo[] workspaceInfos, Guid? projectCollectionId = null)
        {
            try
            {
                workspaceInfos = _teamPilgrimTfsService.GetLocalWorkspaceInfo(projectCollectionId);
                return true;
            }
            catch (Exception ex)
            {
                this.Logger().DebugException(ex);
                LastException = ex;
            }

            workspaceInfos = null;
            return false;
        }
        public bool TryGetWorkspace(out Workspace workspace, WorkspaceInfo workspaceInfo, TfsTeamProjectCollection tfsTeamProjectCollection)
        {
            try
            {
                workspace = _teamPilgrimTfsService.GetWorkspace(workspaceInfo, tfsTeamProjectCollection);
                return true;
            }
            catch (Exception ex)
            {
                this.Logger().DebugException(ex);
                LastException = ex;
            }

            workspace = null;
            return false;
        }
Ejemplo n.º 6
0
        internal static WorkspaceInfo FromXml(InternalServerInfo server, XmlReader reader)
        {
            string elementName = reader.Name;
            WorkspaceInfo info = new WorkspaceInfo(server);

            info.name = reader.GetAttribute("name");
            info.ownerName = reader.GetAttribute("ownerName");
            info.computer = reader.GetAttribute("computer");
            info.comment = reader.GetAttribute("comment");

             			List<string> mappedPaths = new List<string>();
            while (reader.Read())
                {
                    if (reader.NodeType == XmlNodeType.EndElement && reader.Name == elementName)
                        break;

                    if (reader.NodeType == XmlNodeType.Element && reader.Name == "MappedPath")
                        mappedPaths.Add(reader.GetAttribute("path"));
                }

            info.mappedPaths = mappedPaths.ToArray();
            return info;
        }
Ejemplo n.º 7
0
		private void AssertWorkspace(WorkspaceInfo workspaceInfo)
		{
			if (workspaceInfo != null) return;
			throw new Exception("[Rainbow.Tfs] TFS File Handler: No workspace is available or defined for the path " + _filename);
		}
Ejemplo n.º 8
0
 public WorkspaceVersionSpec(WorkspaceInfo workspaceInfo)
 {
     this.name = workspaceInfo.Name;
     this.ownerName = workspaceInfo.OwnerName;
 }
Ejemplo n.º 9
0
 public WorkspaceInfoModel(WorkspaceInfo workspaceInfo)
 {
     WorkspaceInfo = workspaceInfo;
 }
Ejemplo n.º 10
0
        public Workspace GetWorkspace(WorkspaceInfo workspaceInfo)
        {
            if (workspaceInfo == null)
                throw new ArgumentNullException("workspaceInfo");

            return new Workspace(this, workspaceInfo);
        }
Ejemplo n.º 11
0
 public WorkspaceVersionSpec(WorkspaceInfo workspaceInfo)
 {
     this.name      = workspaceInfo.Name;
     this.ownerName = workspaceInfo.OwnerName;
 }
        public Workspace GetWorkspace(WorkspaceInfo workspaceInfo, TfsTeamProjectCollection tfsTeamProjectCollection)
        {
            this.Logger().Trace("GetWorkspace  ProjectCollection: {0} Workspace: {1}", tfsTeamProjectCollection.Name, workspaceInfo.Name);

            return workspaceInfo.GetWorkspace(tfsTeamProjectCollection);
        }