public override void Promote(FrugalListBase <T> oldList)
 {
     if (1 != oldList.Count)
     {
         throw new ArgumentException(System.Xaml.SR.Get("FrugalList_TargetMapCannotHoldAllData", new object[] { oldList.ToString(), this.ToString() }), "oldList");
     }
     this.SetCount(1);
     this.SetAt(0, oldList.EntryAt(0));
 }
 public override void Promote(FrugalListBase <T> oldList)
 {
     for (int i = 0; i < oldList.Count; i++)
     {
         if (this.Add(oldList.EntryAt(i)) != FrugalListStoreState.Success)
         {
             throw new ArgumentException(System.Xaml.SR.Get("FrugalList_TargetMapCannotHoldAllData", new object[] { oldList.ToString(), this.ToString() }), "oldList");
         }
     }
 }
        public override void Promote(FrugalListBase<T> oldList)
        {
            int count = oldList.Count;
            if (3 >= count)
            {
                this.SetCount(oldList.Count);
                switch (count)
                {
                    case 0:
                        return;

                    case 1:
                        this.SetAt(0, oldList.EntryAt(0));
                        return;

                    case 2:
                        this.SetAt(0, oldList.EntryAt(0));
                        this.SetAt(1, oldList.EntryAt(1));
                        return;

                    case 3:
                        this.SetAt(0, oldList.EntryAt(0));
                        this.SetAt(1, oldList.EntryAt(1));
                        this.SetAt(2, oldList.EntryAt(2));
                        return;
                }
                throw new ArgumentOutOfRangeException("oldList");
            }
            throw new ArgumentException(System.Xaml.SR.Get("FrugalList_TargetMapCannotHoldAllData", new object[] { oldList.ToString(), this.ToString() }), "oldList");
        }