public ReadOnlyKeyedCollection(string[] keys, ILightCollection <T> items)
 {
     _coll = new KeyedCollection <T>(keys, items.GetItems());
 }
 public ReadOnlyKeyedCollection(ILightCollection <T> collection)
 {
     string[] keys = CreateFreeKeys(collection.Count);
     _coll = new KeyedCollection <T>(keys, collection.GetItems());
 }
Beispiel #3
0
 /// <summary>
 /// Add a range of Items to this collection
 /// </summary>
 /// <param name="items">An ILightCollection<T> derived collection</param>
 public virtual void AddRange(ILightCollection <T> items)
 {
     InsertRange(this._count, items.GetItems());
 }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="index"></param>
 /// <param name="items"></param>
 public virtual void InsertRange(int index, ILightCollection <T> items)
 {
     InsertRange(index, items.GetItems());
 }
Beispiel #5
0
        /// <summary>
        /// Constructor of LightCollection
        /// </summary>
        /// <param name="coll">The collection from where copy items</param>
        public LightCollection(ILightCollection <T> coll)
        {
            Init(coll.Count);

            this.AddRange(coll.GetItems());
        }