/// <summary>Combines this <see cref="T:System.Delegate" /> with the specified <see cref="T:System.Delegate" /> to form a new delegate.</summary> /// <returns>A <see cref="T:System.Delegate" /> that is the new root of the <see cref="T:System.MulticastDelegate" /> invocation list.</returns> /// <param name="follow">The delegate to combine with this delegate. </param> /// <exception cref="T:System.MemberAccessException">Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. </exception> protected sealed override Delegate CombineImpl(Delegate follow) { if (base.GetType() != follow.GetType()) { throw new ArgumentException(Locale.GetText("Incompatible Delegate Types.")); } MulticastDelegate multicastDelegate = (MulticastDelegate)follow.Clone(); multicastDelegate.SetMulticastInvoke(); MulticastDelegate multicastDelegate2 = multicastDelegate; for (MulticastDelegate multicastDelegate3 = ((MulticastDelegate)follow).prev; multicastDelegate3 != null; multicastDelegate3 = multicastDelegate3.prev) { multicastDelegate2.prev = (MulticastDelegate)multicastDelegate3.Clone(); multicastDelegate2 = multicastDelegate2.prev; } multicastDelegate2.prev = (MulticastDelegate)this.Clone(); multicastDelegate2 = multicastDelegate2.prev; for (MulticastDelegate multicastDelegate3 = this.prev; multicastDelegate3 != null; multicastDelegate3 = multicastDelegate3.prev) { multicastDelegate2.prev = (MulticastDelegate)multicastDelegate3.Clone(); multicastDelegate2 = multicastDelegate2.prev; } return(multicastDelegate); }