public static WeakMulticastDelegate Combine(WeakMulticastDelegate weakDelegate, Delegate realDelegate) { if (realDelegate == null) { return(null); } if (weakDelegate != null) { return(weakDelegate.Combine(realDelegate)); } return(new WeakMulticastDelegate(realDelegate)); }
public static WeakMulticastDelegate operator +(WeakMulticastDelegate d, Delegate realD) { return(WeakMulticastDelegate.Combine(d, realD)); }
/// <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); }
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); }