Example #1
0
        public override void Connect(string serverUri, string remotePath, string localPath, int fromChangeset, string tfsUsername, string tfsPassword, string tfsDomain)
        {
            this._serverUri         = serverUri;
            this._remotePath        = remotePath;
            this._localPath         = localPath;
            this._startingChangeset = fromChangeset;

            try
            {
                NetworkCredential tfsCredential = new NetworkCredential(tfsUsername, tfsPassword, tfsDomain);
                this._teamFoundationServer = new OpenTF.TeamFoundation.Client.TeamFoundationServer(this._serverUri, tfsCredential);
                this._versionControlServer = (VersionControlServer)this._teamFoundationServer.GetService(typeof(VersionControlServer));
            }
            catch (Exception ex)
            {
                throw new Exception("Error connecting to TFS", ex);
            }

            //clear hooked eventhandlers
            BeginChangeSet  = null;
            EndChangeSet    = null;
            FileAdded       = null;
            FileEdited      = null;
            FileDeleted     = null;
            FileUndeleted   = null;
            FileBranched    = null;
            FileRenamed     = null;
            FolderAdded     = null;
            FolderDeleted   = null;
            FolderUndeleted = null;
            FolderBranched  = null;
            FolderRenamed   = null;
            ChangeSetsFound = null;
        }
Example #2
0
        public override void Connect(string serverUri, string remotePath, string localPath, int fromChangeset, string tfsUsername, string tfsPassword, string tfsDomain)
        {
            this._serverUri = serverUri;
            this._remotePath = remotePath;
            this._localPath = localPath;
            this._startingChangeset = fromChangeset;

            try
            {
                NetworkCredential tfsCredential = new NetworkCredential(tfsUsername, tfsPassword, tfsDomain);
                this._teamFoundationServer = new OpenTF.TeamFoundation.Client.TeamFoundationServer(this._serverUri, tfsCredential);
                this._versionControlServer = (VersionControlServer)this._teamFoundationServer.GetService(typeof(VersionControlServer));
            }
            catch (Exception ex)
            {
                throw new Exception("Error connecting to TFS", ex);
            }

            //clear hooked eventhandlers
            BeginChangeSet = null;
            EndChangeSet = null;
            FileAdded = null;
            FileEdited = null;
            FileDeleted = null;
            FileUndeleted = null;
            FileBranched = null;
            FileRenamed = null;
            FolderAdded = null;
            FolderDeleted = null;
            FolderUndeleted = null;
            FolderBranched = null;
            FolderRenamed = null;
            ChangeSetsFound = null;
        }