public void a_set_of_configured_components_being_shut_down() { MessagingSystem.Control.Shutdown(); _receiverControl = Substitute.For<IReceiverControl>(); _channelAction = Substitute.For<IChannelAction>(); _sender = Substitute.For<ISenderNode>(); _rabbitConn = Substitute.For<IRabbitMqConnection>(); ObjectFactory.Configure(map => { map.For<IReceiverControl>().Use(_receiverControl); map.For<IChannelAction>().Use(_channelAction); map.For<ISenderNode>().Use(_sender); map.For<IRabbitMqConnection>().Use(_rabbitConn); }); MessagingSystem.Control.Shutdown(); }
/// <summary> /// Allow this mediator to listen to an event that the IPublisherControl publishes /// </summary> /// <param name="control"></param> public void MapEventToControl(IPublisherControl pubControl, IReceiverControl recControl) { pubControl.InteractionOccursEvent += recControl.AddItemToList; }
/// <summary> /// Implement method to map event from a form to a method in another form /// </summary> /// <param name="parControl">Publisher form</param> /// <param name="childControl">Receiver form</param> public void MapEventControlToControl(IPublisherControl pubControl, IReceiverControl recControl) { pubControl.ActionOccursEvent += recControl.UpdateText; }