/// <summary> /// Called when an event handler is being removed from the mocked event. /// This implementation logs before and after the event has been removed, along with any exceptions thrown. /// </summary> /// <param name="mockInfo">Information about the mock through which the event handler is being removed.</param> /// <param name="value">The event handler that is being removed.</param> public override void Remove(IMockInfo mockInfo, THandler?value) { _logContext.LogBeforeEventRemove(mockInfo, value); try { base.Remove(mockInfo, value); } catch (Exception exception) { _logContext.LogEventRemoveException(mockInfo, exception); throw; } _logContext.LogAfterEventRemove(mockInfo); }