コード例 #1
0
        private void RepositoryManager_OnLocalBranchListUpdated(Dictionary <string, ConfigBranch> branches)
        {
            localBranches = branches;

            Logger.Trace("OnLocalBranchListChanged");
            OnLocalBranchListChanged?.Invoke();
        }
コード例 #2
0
ファイル: RepositoryManager.cs プロジェクト: knsh14/Unity
 private void RemoveLocalBranch(string oldName)
 {
     if (branches.ContainsKey(oldName))
     {
         branches.Remove(oldName);
         OnLocalBranchListChanged?.Invoke();
     }
 }
コード例 #3
0
        private void RepositoryManager_OnLocalBranchRemoved(string name)
        {
            if (localBranches.ContainsKey(name))
            {
                localBranches.Remove(name);

                Logger.Trace("OnLocalBranchListChanged");
                OnLocalBranchListChanged?.Invoke();
            }
            else
            {
                Logger.Warning("Branch {0} is not found", name);
            }
        }
コード例 #4
0
ファイル: RepositoryManager.cs プロジェクト: knsh14/Unity
 private void AddLocalBranch(string name)
 {
     if (!branches.ContainsKey(name))
     {
         var branch = config.GetBranch(name);
         if (!branch.HasValue)
         {
             branch = new ConfigBranch {
                 Name = name
             };
         }
         branches.Add(name, branch.Value);
         OnLocalBranchListChanged?.Invoke();
     }
 }
コード例 #5
0
        private void RepositoryManager_OnLocalBranchAdded(string name)
        {
            if (!localBranches.ContainsKey(name))
            {
                var branch = repositoryManager.Config.GetBranch(name);
                if (!branch.HasValue)
                {
                    branch = new ConfigBranch {
                        Name = name
                    };
                }
                localBranches.Add(name, branch.Value);

                Logger.Trace("OnLocalBranchListChanged");
                OnLocalBranchListChanged?.Invoke();
            }
            else
            {
                Logger.Warning("Branch {0} is already present", name);
            }
        }
コード例 #6
0
 private void RepositoryManager_OnLocalBranchListChanged()
 {
     OnLocalBranchListChanged?.Invoke();
 }