public WeakHandler(Func <Action <Object, E>, H> createAction, Action <Object, E> action, Action <H> removeAction) : base(createAction, removeAction) { Guard.ArgumentNotNull(action, "action"); Target = action.Target; var _methodInfo = action.Method; _methodIsStatic = _methodInfo.IsStatic; _invoker = new EventDelegateInvoker <E>(action.Target != null ? action.Target.GetType() : null, _methodInfo); }
protected override void Dispose(bool disposing) { if (disposing) { base.Dispose(true); if (Target != null) { Target = null; } _invoker = null; } }