Exemplo n.º 1
0
        public virtual PortItem Add(Type type, string name)
        {
            PortItem item = new PortItem {
                Type = type, Name = name
            };

            Add(item);
            return(item);
        }
Exemplo n.º 2
0
        public PortItem Insert(int index, PortItem item)
        {
            if (index > -1 || index <= Count)
            {
                InnerList.Insert(index, item);
            }

            throw new ArgumentOutOfRangeException("index");
        }
Exemplo n.º 3
0
 public void AddRange(PortItemCollection items)
 {
     if (items == null)
     {
         throw new ArgumentNullException("items");
     }
     PortItem[] itemArray = new PortItem[items.Count];
     items.CopyTo(itemArray, 0);
     InnerList.AddRange(itemArray);
 }
Exemplo n.º 4
0
 public int IndexOf(PortItem item)
 {
     for (int index = 0; index < Count; ++index)
     {
         if (this[index] == item)
         {
             return(index);
         }
     }
     return(-1);
 }
Exemplo n.º 5
0
 public virtual PortItem Add(PortItem value)
 {
     InnerList.Add(value);
     return(value);
 }
Exemplo n.º 6
0
 public virtual void Remove(PortItem item)
 => InnerList.Remove(item);
Exemplo n.º 7
0
 public virtual bool Contains(PortItem item) => InnerList.Contains(item);