static Configure InternalRavenPersistence(this Configure config, DocumentStore documentStore) { return(config.InternalRavenPersistence(() => { documentStore.Conventions.FindTypeTagName = RavenConventions.FindTypeTagName; documentStore.Conventions.MaxNumberOfRequestsPerSession = 100; if (SettingsHolder.Get <bool>("Transactions.SuppressDistributedTransactions")) { documentStore.EnlistInDistributedTransactions = false; } if (customisationCallback != null) { customisationCallback(documentStore); } VerifyConnectionToRavenDBServer(documentStore); return new StoreAccessor(documentStore); })); }
/// <summary> /// Configures RavenDB as the default persistence. /// </summary> /// <remarks>This method does not use any of the NServiceBus conventions either specified or out of the box.</remarks> /// <param name="config">The configuration object.</param> /// <param name="documentStore">An <see cref="IDocumentStore"/>.</param> /// <returns>The configuration object.</returns> public static Configure RavenPersistenceWithStore(this Configure config, IDocumentStore documentStore) { return(config.InternalRavenPersistence(() => new StoreAccessor(documentStore))); }