public IEnumerator GetEnumerator()
        {
            for (int i = this.m_Iterators.Count - 1; i >= 0; i--)
            {
                WeakReference reference = (WeakReference)this.m_Iterators[i];
                if (!reference.IsAlive)
                {
                    this.m_Iterators.RemoveAt(i);
                }
            }
            ForEachEnum   target     = new ForEachEnum(this);
            WeakReference reference2 = new WeakReference(target);

            target.WeakRef = reference2;
            this.m_Iterators.Add(reference2);
            return(target);
        }
 private void AdjustEnumeratorsHelper(Node NewOrRemovedNode, ForEachEnum.AdjustIndexType Type)
 {
     for (int i = this.m_Iterators.Count - 1; i >= 0; i--)
     {
         WeakReference reference = (WeakReference)this.m_Iterators[i];
         if (reference.IsAlive)
         {
             ForEachEnum target = (ForEachEnum)reference.Target;
             if (target != null)
             {
                 target.Adjust(NewOrRemovedNode, Type);
             }
         }
         else
         {
             this.m_Iterators.RemoveAt(i);
         }
     }
 }
 public void Clear()
 {
     this.m_KeyedNodesHash.Clear();
     this.m_ItemsList.Clear();
     for (int i = this.m_Iterators.Count - 1; i >= 0; i--)
     {
         WeakReference reference = (WeakReference)this.m_Iterators[i];
         if (reference.IsAlive)
         {
             ForEachEnum target = (ForEachEnum)reference.Target;
             if (target != null)
             {
                 target.AdjustOnListCleared();
             }
         }
         else
         {
             this.m_Iterators.RemoveAt(i);
         }
     }
 }
 public IEnumerator GetEnumerator()
 {
     for (int i = this.m_Iterators.Count - 1; i >= 0; i--)
     {
         WeakReference reference = (WeakReference) this.m_Iterators[i];
         if (!reference.IsAlive)
         {
             this.m_Iterators.RemoveAt(i);
         }
     }
     ForEachEnum target = new ForEachEnum(this);
     WeakReference reference2 = new WeakReference(target);
     target.WeakRef = reference2;
     this.m_Iterators.Add(reference2);
     return target;
 }
 private void AdjustEnumeratorsHelper(Node NewOrRemovedNode, ForEachEnum.AdjustIndexType Type)
 {
     for (int i = this.m_Iterators.Count - 1; i >= 0; i--)
     {
         WeakReference reference = (WeakReference) this.m_Iterators[i];
         if (reference.IsAlive)
         {
             ForEachEnum target = (ForEachEnum) reference.Target;
             if (target != null)
             {
                 target.Adjust(NewOrRemovedNode, Type);
             }
         }
         else
         {
             this.m_Iterators.RemoveAt(i);
         }
     }
 }