public DispatcherServer(Action<DispatchServerConfiguration> configAction) { var config=new DispatchServerConfiguration(); configAction(config); config.Validate(); _config = config; _config.EndpointUpdatesNotifier.Subscribe(this); _config.MessageNotifier.Subscribe(this); }
public DispatcherServer(Action <DispatchServerConfiguration> configAction) { var config = new DispatchServerConfiguration(); configAction(config); config.Validate(); _config = config; _config.EndpointUpdatesNotifier.Subscribe(this); _config.MessageNotifier.Subscribe(this); }
public ClientToServerTests() { _disp = Substitute.For<IConfigureDispatcher>(); _disp.TalkUsing(Arg.Do<ITalkToServer>(v => _clientToServer = v)); _disp.CommunicateBySqlStorage(Setup.GetConnection(), ifExists: TableExistsAction.DropIt); _cfg = new DispatchServerConfiguration(); _cfg.ReceiveFromClientsBySql(Setup.GetConnection()); _serverConfig = Substitute.For<IWantEndpointUpdates>(); _serverRoute = Substitute.For<IRouteMessages>(); _cfg.Storage = Substitute.For<IStoreDispatcherServerState>(); _cfg.DeliveryErrorsQueue = Substitute.For<IDeliveryErrorsQueue>(); _cfg.EndpointUpdatesNotifier.Subscribe(_serverConfig); _cfg.MessageNotifier.Subscribe(_serverRoute); }