Exemple #1
0
 public object this[int index]
 {
     get
     {
         ClientUtils.WeakRefCollection.WeakRefObject weakRefObject = this.InnerList[index] as ClientUtils.WeakRefCollection.WeakRefObject;
         if (weakRefObject != null && weakRefObject.IsAlive)
         {
             return(weakRefObject.Target);
         }
         return(null);
     }
     set
     {
         this.InnerList[index] = this.CreateWeakRefObject(value);
     }
 }
Exemple #2
0
 public override bool Equals(object obj)
 {
     ClientUtils.WeakRefCollection.WeakRefObject weakRefObject = obj as ClientUtils.WeakRefCollection.WeakRefObject;
     return(weakRefObject == this || (weakRefObject != null && (weakRefObject.Target == this.Target || (this.Target != null && this.Target.Equals(weakRefObject.Target)))));
 }