示例#1
0
        private void RepositoryManagerOnCurrentBranchUpdated(ConfigBranch?branch, ConfigRemote?remote)
        {
            taskManager.RunInUI(() =>
            {
                var data = new RepositoryInfoCacheData();
                data.CurrentConfigBranch = branch;
                data.CurrentGitBranch    = branch.HasValue ? (GitBranch?)GetLocalGitBranch(branch.Value.name, branch.Value) : null;
                data.CurrentConfigRemote = remote;
                data.CurrentGitRemote    = remote.HasValue ? (GitRemote?)GetGitRemote(remote.Value) : null;
                name     = null;
                cloneUrl = null;
                cacheContainer.RepositoryInfoCache.UpdateData(data);

                // force refresh of the Name and CloneUrl propertys
                var n = Name;
            });
        }
示例#2
0
 private void RepositoryManagerOnCurrentBranchUpdated(ConfigBranch?branch, ConfigRemote?remote)
 {
     taskManager.RunInUI(() =>
     {
         var data = new RepositoryInfoCacheData();
         data.CurrentConfigBranch = branch;
         data.CurrentGitBranch    = branch.HasValue ? (GitBranch?)GetLocalGitBranch(branch.Value.name, branch.Value) : null;
         data.CurrentConfigRemote = remote;
         data.CurrentGitRemote    = remote.HasValue ? (GitRemote?)GetGitRemote(remote.Value) : null;
         name     = null;
         cloneUrl = null;
         cacheContainer.RepositoryInfoCache.UpdateData(data);
         var n = Name; // force refresh of the Name and CloneUrl property
         // update active state in local branches
         cacheContainer.BranchCache.LocalBranches = LocalConfigBranches;
         // update tracking state in remote branches
         cacheContainer.BranchCache.RemoteBranches = RemoteConfigBranches;
     });
 }