Exemplo n.º 1
0
        internal TfsTemporaryWorkspace(TfsBridgeProvider host, Workspace tfsWorkspace, ITfsBranch sourceBranch, string mappedFolder, string targetFolder)
        {
            TfsBridgeProvider = host;
            SourceBranch      = sourceBranch;
            MappedFolder      = mappedFolder;
            TargetFolder      = targetFolder;
            Conflicts         = new List <ITfsMergeConflict>();
            PendingChanges    = new List <ITfsPendingChange>();

            TfsWorkspace = tfsWorkspace;

            //TfsWorkspace.VersionControlServer.ResolvedConflict += VersionControlServer_ResolvedConflict;
            //TfsWorkspace.VersionControlServer.Conflict += VersionControlServer_Conflict;

            //TfsWorkspace.VersionControlServer.NewPendingChange += VersionControlServer_NewPendingChange;
            //TfsWorkspace.VersionControlServer.PendingChangeCandidatesChanged += VersionControlServer_PendingChangeCandidatesChanged;
            //TfsWorkspace.VersionControlServer.PendingChangesChanged += VersionControlServer_PendingChangesChanged;
        }
Exemplo n.º 2
0
        protected void Dispose(bool disposing)
        {
            Repository.Instance.BackgroundTaskManager.Cancel(Constants.Tasks.PendingChangeRefreshTaskKey);
            Repository.Instance.BackgroundTaskManager.Cancel(Constants.Tasks.ConflictsRefreshTaskKey);

            if (TfsWorkspace != null)
            {
                //TfsWorkspace.VersionControlServer.ResolvedConflict -= VersionControlServer_ResolvedConflict;
                //TfsWorkspace.VersionControlServer.Conflict -= VersionControlServer_Conflict;

                //TfsWorkspace.VersionControlServer.NewPendingChange -= VersionControlServer_NewPendingChange;
                //TfsWorkspace.VersionControlServer.PendingChangeCandidatesChanged -= VersionControlServer_PendingChangeCandidatesChanged;
                //TfsWorkspace.VersionControlServer.PendingChangesChanged -= VersionControlServer_PendingChangesChanged;

                var tfsWorkspace = TfsWorkspace;
                TfsWorkspace = null;
                TfsBridgeProvider.DeleteTemporaryWorkspace(tfsWorkspace, MappedFolder);
            }
        }