/// <summary>
        /// Registers the RavenDB EventStore
        /// </summary>
        /// <param name="configuration">The abstract EventStore configuration</param>
        /// <param name="documentStore">The RavenDB document store</param>
        public static void UseRavenEventStore(
            this AbstractEventStoreConfiguration configuration,
            IDocumentStore documentStore)
        {
            DocumentStoreSetup.CreateIndexes(documentStore);
            DocumentStoreSetup.RegisterIdConventions(documentStore);

            configuration.AddConfigurationItem(RavenEventStore.DocumentStore, documentStore);
            configuration.Register(config => new RavenEventStore(config));
        }
예제 #2
0
        /// <summary>
        /// Creates a new instance of <see cref="CompositionRoot"/>
        /// </summary>
        public CompositionRoot()
        {
            this.jitneyFactory           = new JitneyFactory();
            this.eventStoreFactory       = new EventStoreFactory();
            this.jitneyConfiguration     = new ContainerLessJitneyConfiguration(this.jitneyFactory);
            this.eventStoreConfiguration = new ContainerLessEventStoreConfiguration(this.eventStoreFactory);
            this.boundedContexts         = new List <IBoundedContext>();

            this.executionContext = null;
        }
 /// <summary>
 /// Registers the RavenDB EventStore
 /// </summary>
 /// <param name="configuration">The abstract EventStore configuration</param>
 public static void UseRavenEventStore(this AbstractEventStoreConfiguration configuration)
 {
     configuration.UseRavenEventStore(CreateDocumentStore());
 }