protected override __Delegate RemoveImpl(__Delegate d) { var j = -1; var a = ((__Delegate[])(object)list); for (int i = 0; i < a.Length; i++) { if (a[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)); }
protected virtual __Delegate CombineImpl(__Delegate d) { return(null); //throw new global::System.Exception("use MulticastDelegate instead"); }
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"); }