Ejemplo n.º 1
0
 public static WeakMulticastDelegate Combine(WeakMulticastDelegate weakDelegate, Delegate realDelegate)
 {
     if (realDelegate == null)
     {
         return(null);
     }
     if (weakDelegate != null)
     {
         return(weakDelegate.Combine(realDelegate));
     }
     return(new WeakMulticastDelegate(realDelegate));
 }
Ejemplo n.º 2
0
 public static WeakMulticastDelegate operator +(WeakMulticastDelegate d, Delegate realD)
 {
     return(WeakMulticastDelegate.Combine(d, realD));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Combines a weak multicast delegate with a normal delegate
 /// </summary>
 /// <param name="weakDelegate">the weak multicast delegate</param>
 /// <param name="realDelegate">the normal delegate</param>
 /// <returns>the new combinded weak multicast delegate</returns>
 public static WeakMulticastDelegate Combine(WeakMulticastDelegate weakDelegate, Delegate realDelegate)
 {
     if (realDelegate == null)
         return null;
     return (weakDelegate == null) ? new WeakMulticastDelegate(realDelegate) : weakDelegate.Combine(realDelegate);
 }
Ejemplo n.º 4
0
        public static WeakMulticastDelegate Combine(WeakMulticastDelegate weakDelegate, Delegate realDelegate)
        {
            WeakMulticastDelegate result;

            if (realDelegate == null)
            {
                result = null;
            }
            else
            {
                result = ((weakDelegate == null) ? new WeakMulticastDelegate(realDelegate) : weakDelegate.Combine(realDelegate));
            }
            return(result);
        }