示例#1
0
 public override void Promote(FrugalMapBase newMap)
 {
     if (newMap.InsertEntry(this._entry0.Key, this._entry0.Value) != FrugalMapStoreState.Success)
     {
         throw new ArgumentException(string.Format("FrugalMap_TargetMapCannotHoldAllData: {0}, {1}, {2}", new object[3]
         {
             (object)this.ToString(),
             (object)newMap.ToString(),
             (object)nameof(newMap)
         }));
     }
     if (newMap.InsertEntry(this._entry1.Key, this._entry1.Value) != FrugalMapStoreState.Success)
     {
         throw new ArgumentException(string.Format("FrugalMap_TargetMapCannotHoldAllData: {0}, {1}, {2}", new object[3]
         {
             (object)this.ToString(),
             (object)newMap.ToString(),
             (object)nameof(newMap)
         }));
     }
     if (newMap.InsertEntry(this._entry2.Key, this._entry2.Value) != FrugalMapStoreState.Success)
     {
         throw new ArgumentException(string.Format("FrugalMap_TargetMapCannotHoldAllData: {0}, {1}, {2}", new object[3]
         {
             (object)this.ToString(),
             (object)newMap.ToString(),
             (object)nameof(newMap)
         }));
     }
 }
示例#2
0
 public override void Promote(FrugalMapBase newMap)
 {
   for (int index = 0; index < this._entries.Length; ++index)
   {
     if (newMap.InsertEntry(this._entries[index].Key, this._entries[index].Value) != FrugalMapStoreState.Success)
       throw new ArgumentException(string.Format("FrugalMap_TargetMapCannotHoldAllData: {0}, {1}, {2}", new object[3]
       {
         (object) this.ToString(),
         (object) newMap.ToString(),
         (object) nameof (newMap)
       }));
   }
 }