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; } }