Exemple #1
0
        public void Remove(OutputExtensionConnector value)
        {
            int index = IndexOf(value);

            if (index == -1)
            {
                throw(new Exception("ClassOutputConnector not found in collection."));
            }
            RemoveAt(index);
        }
Exemple #2
0
 public int IndexOf(OutputExtensionConnector value)
 {
     for (int x = 0; x < itemCount; x++)
     {
         if (extensions[x].Equals(value))
         {
             return(x);
         }
     }
     return(-1);
 }
Exemple #3
0
 public void Insert(int index, OutputExtensionConnector value)
 {
     itemCount++;
     if (itemCount > extensions.Length)
     {
         for (int x = index + 1; x == itemCount - 2; x++)
         {
             extensions[x] = extensions[x - 1];
         }
     }
     extensions[index] = value;
 }
Exemple #4
0
 public int Add(OutputExtensionConnector value)
 {
     itemCount++;
     if (itemCount > extensions.GetUpperBound(0) + 1)
     {
         OutputExtensionConnector[] tempExtensions = new OutputExtensionConnector[itemCount * 2];
         for (int x = 0; x <= extensions.GetUpperBound(0); x++)
         {
             tempExtensions[x] = extensions[x];
         }
         extensions = tempExtensions;
     }
     extensions[itemCount - 1] = value;
     return(itemCount - 1);
 }
Exemple #5
0
 public bool Contains(OutputExtensionConnector value)
 {
     return(IndexOf(value) != -1);
 }