private void ConnectionsListView_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (ConnectionsListView.SelectedItem is ConfiguredConnection selectedConfiguredConnection) { _configuredConnection = selectedConfiguredConnection; TestConnectionButton.IsEnabled = true; SelectConnectionButton.IsEnabled = true; return; } TestConnectionButton.IsEnabled = false; SelectConnectionButton.IsEnabled = false; _configuredConnection = null; }
public MockRepositorySpecification() { StreamNameBuilder = new PrefixedCamelCaseStreamNameBuilder(Schema); StreamStoreConnection = new MockStreamStoreConnection(Schema); StreamStoreConnection.Connect(); EventSerializer = new JsonMessageSerializer(); MockRepository = new StreamStoreRepository(StreamNameBuilder, StreamStoreConnection, EventSerializer); ConfiguredConnection = new ConfiguredConnection(StreamStoreConnection, StreamNameBuilder, EventSerializer); var connectorBus = new InMemoryBus("connector"); StreamStoreConnection.SubscribeToAll(evt => { if (evt is ProjectedEvent) { return; } connectorBus.Publish((IMessage)EventSerializer.Deserialize(evt)); }); RepositoryEvents = new TestQueue(connectorBus, new[] { typeof(Event) }); }