public IEventStoreConnection Build()
        {
            if (m_configuration == null)
            {
                m_configuration = new EventStoreConnectionConfiguration();
                m_configure(m_configuration);

                m_configuration.AssertConfigurationCompleted();
                m_factory = new StorageFactory();
            }

            var journalTable = m_factory.CreateTable(
                m_configuration.StorageConnectionString,
                m_configuration.JournalTableName);

            var sessionsBlob = m_factory.CreateBlobContainer(
                m_configuration.StorageConnectionString,
                m_configuration.StreamConsumerSessionsBlobName);

            return new EventStoreConnection(
                new EventJournal(journalTable),
                new EventStreamConsumingSessionFactory(sessionsBlob));
        }
Ejemplo n.º 2
0
        private static EventJournal PrepareEventJournal()
        {
            var factory = new StorageFactory();
            var journal = new EventJournal(factory.CreateTable("UseDevelopmentStorage=true", "TestEventJournal"));

            return journal;
        }