/// <summary>
        /// Adds the range.
        /// </summary>
        /// <param name="items">The items.</param>
        public virtual void AddRange(KeyedCollection <T> items)
        {
            if (items == null)
            {
                return;
            }

            AddRange(items.Keys, items.GetItems());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReadOnlyKeyedCollection{T}"/> class.
 /// </summary>
 /// <param name="keys">The keys.</param>
 /// <param name="items">The items.</param>
 public ReadOnlyKeyedCollection(string[] keys, ILightCollection <T> items)
 {
     _coll = new KeyedCollection <T>(keys, items.GetItems());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReadOnlyKeyedCollection{T}"/> class.
 /// </summary>
 /// <param name="collection">The collection.</param>
 public ReadOnlyKeyedCollection(IKeyedCollection <T> collection)
 {
     _coll = (KeyedCollection <T>)collection;//new KeyedCollection<T>(collection.Keys, collection.GetItems());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReadOnlyKeyedCollection{T}"/> class.
 /// </summary>
 /// <param name="collection">The collection.</param>
 public ReadOnlyKeyedCollection(ILightCollection <T> collection)
 {
     string[] keys = CreateFreeKeys(collection.Count);
     _coll = new KeyedCollection <T>(keys, collection.GetItems());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReadOnlyKeyedCollection{T}"/> class.
 /// </summary>
 /// <param name="keys">The keys.</param>
 /// <param name="array">The array.</param>
 public ReadOnlyKeyedCollection(string[] keys, T[] array)
 {
     _coll = new KeyedCollection <T>(keys, array);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Enumerator"/> struct.
 /// </summary>
 /// <param name="coll">The coll.</param>
 public Enumerator(KeyedCollection <T> coll)
 {
     this.m_KeyedColl = coll;
     this.m_Index     = 0;
     m_Current        = default(T);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeCollection{T}"/> class.
 /// </summary>
 /// <param name="initialSize">The initial size.</param>
 public TreeCollection(int initialSize)
 {
     _globalCollection = new KeyedCollection <TreeItem <T> >(initialSize);
     _globalValues     = new KeyedCollection <T>(initialSize);
     _rootItems        = new LightCollection <string>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeItemEnumerator{T}"/> class.
 /// </summary>
 /// <param name="globalCollection">The global collection.</param>
 /// <param name="rootItems">The root items.</param>
 internal TreeItemEnumerator(ref KeyedCollection <TreeItem <T> > globalCollection, LightCollection <string> rootItems)
 {
     _globalCollection = globalCollection;
     _rootItems        = rootItems;
 }