コード例 #1
0
 public void AddLocalBranch(string branch)
 {
     if (!LocalConfigBranches.ContainsKey(branch))
     {
         var now = DateTimeOffset.Now;
         LocalConfigBranches.Add(branch, new ConfigBranch(branch));
         Logger.Trace("AddLocalBranch {0} branch:{1} ", now, branch);
         SaveData(now, true);
     }
     else
     {
         Logger.Warning("Branch {0} is already present", branch);
     }
 }
コード例 #2
0
 public void RemoveLocalBranch(string branch)
 {
     if (LocalConfigBranches.ContainsKey(branch))
     {
         var now = DateTimeOffset.Now;
         LocalConfigBranches.Remove(branch);
         Logger.Trace("RemoveLocalBranch {0} branch:{1} ", now, branch);
         SaveData(now, true);
     }
     else
     {
         Logger.Warning("Branch {0} is not found", branch);
     }
 }