Example #1
0
        public void Add(BranchInfo branchInfo, bool translate)
        {
            if (branchInfo == null)
            {
                return;
            }

            if (this._branchInfo == null)
            {
                this._branchInfo = new Dictionary <string, BranchInfo>();
            }

            if (!this._branchInfo.ContainsKey(branchInfo.Key))
            {
                //Console.WriteLine("INFO: AddBranchInfo: key=" + branchInfo.key);
                if (translate)
                {
                    this._branchInfo.Add(branchInfo.Key, branchInfo.Translate(this._ctx));
                }
                else
                {
                    this._branchInfo.Add(branchInfo.Key, branchInfo);
                }
            }
        }
Example #2
0
 public void Add(BranchInfo branchInfo)
 {
     if (this._frozen)
     {
         Console.WriteLine("WARNING: State:Add: state is frozen, nothing added.");
         return;
     }
     lock (this._ctxLock)
     {
         this.BranchInfoStore.Add(branchInfo, true);
     }
 }
Example #3
0
 public void Remove(BranchInfo branchInfo)
 {
     this._branchInfo.Remove(branchInfo.Key);
 }
Example #4
0
 public void Remove(BranchInfo branchInfo)
 {
     Contract.Requires(branchInfo != null);
     this.branchInfo_.Remove(branchInfo.Key);
 }