public void FireCustomEvent_PublicationMustContainCustemEventArgumentsType() { CustomEventArguments e = new CustomEventArguments("test"); this.testee.Fire(EventTopics.CustomEventArgs, this, HandlerRestriction.None, this, e); this.interceptedPublication.Should().NotBeNull(); Assert.Equal(typeof(CustomEventArguments), this.interceptedPublication.EventArgsType); }
public void FireCustomEvent() { Subscriber s = this.RegisterSubscriber(); CustomEventArguments e = new CustomEventArguments("test"); this.testee.Fire(EventTopics.CustomEventArgs, this, HandlerRestriction.None, this, e); s.ReceivedCustomEventArguments.Should().BeSameAs(e); }
/// <summary> /// Handles the custom event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void HandleCustomEvent(object sender, CustomEventArguments e) { this.valueFromCustomEventArgs = e.String; }
public void SimpleEvent(object sender, CustomEventArguments e) { }
/// <summary> /// Handles the custom event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The event arguments.</param> public void HandleCustomEvent(object sender, CustomEventArguments e) { this.Called = true; }
public void CustomEventArgs(object sender, CustomEventArguments e) { this.ReceivedCustomEventArguments = e; }