/// <summary> /// Configures Rebus to use RavenDb to store timeouts. /// </summary> public static void StoreInRavenDb(this StandardConfigurer<ITimeoutManager> configurer, IDocumentStore documentStore) { if (configurer == null) throw new ArgumentNullException("configurer"); if (documentStore == null) throw new ArgumentNullException("documentStore"); documentStore.ExecuteIndex(new TimeoutIndex()); configurer.Register(c => { var timeoutManager = new RavenDbTimeoutManager(documentStore); return timeoutManager; }); }
/// <summary> /// Configures Rebus to use RavenDb to store timeouts. /// </summary> public static void StoreInRavenDb(this StandardConfigurer<ITimeoutManager> configurer, IDocumentStore documentStore) { if (configurer == null) throw new ArgumentNullException(nameof(configurer)); if (documentStore == null) throw new ArgumentNullException(nameof(documentStore)); documentStore.ExecuteIndex(new TimeoutIndex()); configurer.Register(c => { var rebusLoggerFactory = c.Get<IRebusLoggerFactory>(); var timeoutManager = new RavenDbTimeoutManager(documentStore, rebusLoggerFactory); return timeoutManager; }); }