public static Delegate Combine(Delegate a, Delegate b) { if (a == null) return b; else if (b == null) return a; else if (a.As<JsObject>().member("all")) return ((MulticastDelegate)a).Add(b); else return new MulticastDelegate(a.Target, new[] { a, b }); }
public static Delegate Remove(Delegate source, Delegate value) { if (source == value || source == null) return null; else { if (source.As<JsObject>().member("all")) return ((MulticastDelegate)source).Remove(value); else return source; } }
public static Delegate Remove(Delegate source, Delegate value) { if (source == value || source == null) { return(null); } else { if (source.As <JsObject>().member("all")) { return(((MulticastDelegate)source).Remove(value)); } else { return(source); } } }
public static Delegate Combine(Delegate a, Delegate b) { if (a == null) { return(b); } else if (b == null) { return(a); } else if (a.As <JsObject>().member("all")) { return(((MulticastDelegate)a).Add(b)); } else { return(new MulticastDelegate(a.Target, new[] { a, b })); } }