public object Set(string name, object instance, Type type, object value, params object[] arguments) { EventInfo ei = type.GetEvent(name, PropertyFilter); if (ei == null) { return(NoResult); } if (!CanBind(ei)) { return(NoResult); } RemoveDelegate remove_delegate = value as RemoveDelegate; if (remove_delegate == null) { EventBroker.AssignEvent(ei, instance, (IInvokable)value); } else { EventBroker.RemoveEvent(ei, instance, remove_delegate.OriginalMethod); } return(value); }
public void AddHandler(object value) { EventBroker.AssignEvent(@event, Target, (IInvokable)value); }