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(); }
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; }
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; }
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; }
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); }
public WorkspaceVersionSpec(WorkspaceInfo workspaceInfo) { this.name = workspaceInfo.Name; this.ownerName = workspaceInfo.OwnerName; }
public WorkspaceInfoModel(WorkspaceInfo workspaceInfo) { WorkspaceInfo = workspaceInfo; }
public Workspace GetWorkspace(WorkspaceInfo workspaceInfo) { if (workspaceInfo == null) throw new ArgumentNullException("workspaceInfo"); return new Workspace(this, workspaceInfo); }
public Workspace GetWorkspace(WorkspaceInfo workspaceInfo, TfsTeamProjectCollection tfsTeamProjectCollection) { this.Logger().Trace("GetWorkspace ProjectCollection: {0} Workspace: {1}", tfsTeamProjectCollection.Name, workspaceInfo.Name); return workspaceInfo.GetWorkspace(tfsTeamProjectCollection); }