Example #1
0
 public override bool Equals(object obj)
 {
     WindowsFormsUtils.WeakRefCollection collection1 = obj as WindowsFormsUtils.WeakRefCollection;
     if ((collection1 == null) || (this.Count != collection1.Count))
     {
         return(false);
     }
     for (int num1 = 0; num1 < this.Count; num1++)
     {
         if (this.InnerList[num1] != collection1.InnerList[num1])
         {
             return(false);
         }
     }
     return(true);
 }
Example #2
0
 public override bool Equals(object obj)
 {
     WindowsFormsUtils.WeakRefCollection weakRefCollection = obj as WindowsFormsUtils.WeakRefCollection;
     if (weakRefCollection == null || this.Count != weakRefCollection.Count)
     {
         return(false);
     }
     for (int index = 0; index < this.Count; ++index)
     {
         if (this.InnerList[index] != weakRefCollection.InnerList[index])
         {
             return(false);
         }
     }
     return(true);
 }
Example #3
0
 private static void Copy(WindowsFormsUtils.WeakRefCollection sourceList, int sourceIndex, WindowsFormsUtils.WeakRefCollection destinationList, int destinationIndex, int length)
 {
     if (sourceIndex < destinationIndex)
     {
         sourceIndex      += length;
         destinationIndex += length;
         while (length > 0)
         {
             destinationList.InnerList[--destinationIndex] = sourceList.InnerList[--sourceIndex];
             length--;
         }
     }
     else
     {
         while (length > 0)
         {
             destinationList.InnerList[destinationIndex++] = sourceList.InnerList[sourceIndex++];
             length--;
         }
     }
 }