コード例 #1
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     WindowsFormsUtils.WeakRefCollection.WeakRefObject weakRefObject = obj as WindowsFormsUtils.WeakRefCollection.WeakRefObject;
     return(weakRefObject != null && this.Target == weakRefObject.Target && this.Target != null);
 }
コード例 #2
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     WindowsFormsUtils.WeakRefCollection.WeakRefObject obj1 = obj as WindowsFormsUtils.WeakRefCollection.WeakRefObject;
     if (((obj1 != null) && (this.Target == obj1.Target)) && (this.Target != null))
     {
         return(true);
     }
     return(false);
 }
コード例 #3
0
 public object this[int index]
 {
     get
     {
         WindowsFormsUtils.WeakRefCollection.WeakRefObject obj1 = this.InnerList[index] as WindowsFormsUtils.WeakRefCollection.WeakRefObject;
         if ((obj1 != null) && obj1.IsAlive)
         {
             return(obj1.Target);
         }
         return(null);
     }
     set
     {
         this.InnerList[index] = this.CreateWeakRefObject(value);
     }
 }
コード例 #4
0
 public object this[int index]
 {
     get
     {
         WindowsFormsUtils.WeakRefCollection.WeakRefObject inner = this.InnerList[index] as WindowsFormsUtils.WeakRefCollection.WeakRefObject;
         if (inner != null && inner.IsAlive)
         {
             return(inner.Target);
         }
         return((object)null);
     }
     set
     {
         this.InnerList[index] = (object)this.CreateWeakRefObject(value);
     }
 }