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); } }
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))))); }