public MessageStoreActivationStateModel(MessageStoreConfig store) : this()
 {
     StoreType        = store.GetType().Name;
     TypeName         = store.TypeName;
     Name             = store.Name;
     ConnectionString = store.ConnectionString;
     TableName        = store.TableName;
 }
 public IAmAMessageStore <Message> Get(MessageStoreConfig messageStore)
 {
     if (!_storesCreated.ContainsKey(messageStore.Name))
     {
         _storesCreated.Add(messageStore.Name, _storeCtorLookup[messageStore.StoreType].Invoke(messageStore));
     }
     return(_storesCreated[messageStore.Name]);
 }
 public MessageStoreActivationStateModel(MessageStoreConfig store) : this()
 {
     storeType = store.GetType().Name;
     typeName = store.TypeName;
     name = store.Name;
     connectionString = store.ConnectionString;
     tableName = store.TableName;
 }
 public IAmAMessageStore<Message> Get(MessageStoreConfig messageStore)
 {
     if (!_storesCreated.ContainsKey(messageStore.Name))
     {
         _storesCreated.Add(messageStore.Name, _storeCtorLookup[messageStore.StoreType].Invoke(messageStore));
     }
     return _storesCreated[messageStore.Name];
 }
Exemplo n.º 5
0
 public MessageStoreViewerModel(IAmAMessageStore <Message> connectedStore, MessageStoreConfig foundState)
 {
     Name             = foundState.Name;
     StoreType        = foundState.StoreType;
     TypeName         = foundState.TypeName;
     ConnectionString = foundState.ConnectionString;
     TableName        = foundState.TableName;
     //TODO: ++ double something with connectedStore
 }
Exemplo n.º 6
0
 public MessageStoreViewerModel(IAmAMessageStore<Message> connectedStore, MessageStoreConfig foundState)
 {
     Name = foundState.Name;
     StoreType = foundState.StoreType;
     TypeName = foundState.TypeName;
     ConnectionString = foundState.ConnectionString;
     TableName = foundState.TableName;
     //TODO: ++ double something with connectedStore
 }
Exemplo n.º 7
0
        public IAmAMessageStore <Message> Connect(string messageStoreName)
        {
            if (_messageStoreList == null)
            {
                _messageStoreList = _messageStoreListCache.Load();
            }
            var stores = _messageStoreConfigProvider.Get();
            MessageStoreConfig foundStore = stores.Single(s => s.Name == messageStoreName);

            return(_messageStoreList.Get(foundStore));
        }
 public void Establish()
 {
     _browser = new Browser(new ConfigurableBootstrapper(with =>
     {
         var stores = new List <MessageStoreConfig>
         {
             MessageStoreConfig.Create("store1", typeof(MsSqlMessageStore).FullName, "conn1", "table1"),
             MessageStoreConfig.Create("store2", typeof(MsSqlMessageStore).FullName, "conn2", "table2")
         };
         var activationListModelRetriever = new FakeActivationListModelRetriever(new MessageStoreActivationStateListModel(stores));
         with.Module(new StoresNancyModule(activationListModelRetriever, new FakeMessageStoreViewerModelRetriever(), new FakeMessageListViewModelRetriever()));
     }));
 }
Exemplo n.º 9
0
        public RetrieveMessageStoreContentTypeJsonTests()
        {
            _browser = new Browser(new ConfigurableBootstrapper(with =>
            {
                var stores = new List <MessageStoreConfig>
                {
                    MessageStoreConfig.Create("store1", typeof(MsSqlMessageStore).FullName, "conn1", "table1"),
                    MessageStoreConfig.Create("store2", typeof(MsSqlMessageStore).FullName, "conn2", "table2")
                };
                var messageStoreActivationStateListViewModelRetriever = new FakeActivationListModelRetriever(new MessageStoreActivationStateListModel(stores));
                var viewrModelRetriever = new FakeMessageStoreViewerModelRetriever(new MessageStoreViewerModel());
                var retriever           = new FakeMessageListViewModelRetriever();

                with.Module(new StoresNancyModule(messageStoreActivationStateListViewModelRetriever, viewrModelRetriever, retriever));
            }));
        }
Exemplo n.º 10
0
        public void Establish()
        {
            _browser = new Browser(new ConfigurableBootstrapper(with =>
            {
                var stores = new List <paramore.brighter.commandprocessor.messageviewer.Ports.Domain.Config.MessageStoreConfig>
                {
                    MessageStoreConfig.Create("store1", typeof(MsSqlMessageStore).FullName, "conn1", "table1"),
                    MessageStoreConfig.Create("store2", typeof(MsSqlMessageStore).FullName, "conn2", "table2")
                };
                var messageStoreActivationStateListViewModelRetriever = new FakeActivationListModelRetriever(new MessageStoreActivationStateListModel(stores));
                var viewrModelRetriever = new FakeMessageStoreViewerModelRetriever(new MessageStoreViewerModel());
                var retriever           = new FakeMessageListViewModelRetriever();

                with.Module(new StoresNancyModule(messageStoreActivationStateListViewModelRetriever, viewrModelRetriever, retriever));
            }));
        }
Exemplo n.º 11
0
 public static MessageStoreConfig Create(string name, string type, string connectionString, string tableName)
 {
     return(MessageStoreConfig.Create(name, type, connectionString, tableName));
 }
 //TODO: as statics can't use abstract, I'd perfer something better!
 protected when_creating_a_message_store_Base(MessageStoreConfig item)
 {
     MessageStoreConfig = item;
 }
 public void Add(MessageStoreConfig messageStoreDetails)
 {
     _stores.Add(messageStoreDetails);
 }
 public FakeMessageStoreConfigProvider(MessageStoreConfig messageStore)
 {
     Add(messageStore);
 }