public static IConfigure UsingRavenDB(this IEventsConfiguration eventsConfiguration, Action<RegularEventStoreConfiguration> configureCallback)
        {
            eventsConfiguration.EventStoreType = typeof(EventStore);
            eventsConfiguration.EventSubscriptionsType = typeof(EventSubscriptions);

            var configuration = new RegularEventStoreConfiguration();
            configureCallback(configuration);
            Configure.Instance.Container.Bind<IEventStoreConfiguration>(configuration);

            var eventSubscriptionsConfiguration = new RegularEventSubscriptionsConfiguration();
            configuration.CopyTo(eventSubscriptionsConfiguration);
            Configure.Instance.Container.Bind<IEventSubscriptionsConfiguration>(eventSubscriptionsConfiguration);

            return Configure.Instance;
        }
示例#2
0
        public static IConfigure UsingRavenDB(this IEventsConfiguration eventsConfiguration, Action <RegularEventStoreConfiguration> configureCallback)
        {
            eventsConfiguration.EventStoreType         = typeof(EventStore);
            eventsConfiguration.EventSubscriptionsType = typeof(EventSubscriptions);

            var configuration = new RegularEventStoreConfiguration();

            configureCallback(configuration);
            Configure.Instance.Container.Bind <IEventStoreConfiguration>(configuration);

            var eventSubscriptionsConfiguration = new RegularEventSubscriptionsConfiguration();

            configuration.CopyTo(eventSubscriptionsConfiguration);
            Configure.Instance.Container.Bind <IEventSubscriptionsConfiguration>(eventSubscriptionsConfiguration);

            return(Configure.Instance);
        }