protected override __Delegate RemoveImpl(__Delegate d) { var j = -1; for (int i = 0; i < list.length; i++) { if (list[i] == d) { j = i; break; } } if (j > -1) { list.splice(j, 1); } if (list.length == 0) { return(null); } return(this); }
public static __Delegate Remove(__Delegate source, __Delegate value) { if (source == null) { return(null); } if (value == null) { return(source); } return(source.RemoveImpl(value)); }
public static __Delegate Combine(__Delegate a, __Delegate b) { if (a == null) { return(b); } if (b == null) { return(a); } return(a.CombineImpl(b)); }
public static bool IsEqual(__Delegate a, __Delegate b) { if ((object)a == null) { return(false); } if ((object)b == null) { return(false); } return(a.Method == b.Method && a.Target == b.Target); }
protected override __Delegate CombineImpl(__Delegate d) { list.push(d); return(this); }
protected virtual __Delegate RemoveImpl(__Delegate d) { throw new global::System.Exception("use MulticastDelegate instead"); }