示例#1
0
        public ITransactionalStorage NewTransactionalStorage(string requestedStorage = null)
        {
            ITransactionalStorage newTransactionalStorage;
            string storageType = GetDefaultStorageType(requestedStorage);

            if (storageType == "munin")
            {
                newTransactionalStorage = new Storage.Managed.TransactionalStorage(new RavenConfiguration {
                    DataDirectory = DataDir,
                }, () => { });
            }
            else
            {
                newTransactionalStorage = new Storage.Esent.TransactionalStorage(new RavenConfiguration {
                    DataDirectory = DataDir,
                }, () => { });
            }

            newTransactionalStorage.Initialize(new DummyUuidGenerator(), new OrderedPartCollection <AbstractDocumentCodec>());
            return(newTransactionalStorage);
        }
示例#2
0
        public ITransactionalStorage NewTransactionalStorage()
        {
            ITransactionalStorage newTransactionalStorage;
            string storageType = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("raventest_storage_engine"))
                                                                         ? ConfigurationManager.AppSettings["Raven/StorageEngine"]
                                                                         : Environment.GetEnvironmentVariable("raventest_storage_engine");

            if (storageType == "munin")
            {
                newTransactionalStorage = new Storage.Managed.TransactionalStorage(new RavenConfiguration {
                    DataDirectory = DataDir,
                }, () => { });
            }
            else
            {
                newTransactionalStorage = new Storage.Esent.TransactionalStorage(new RavenConfiguration {
                    DataDirectory = DataDir,
                }, () => { });
            }

            newTransactionalStorage.Initialize(new DummyUuidGenerator(), new OrderedPartCollection <AbstractDocumentCodec>());
            return(newTransactionalStorage);
        }
示例#3
0
		public ITransactionalStorage NewTransactionalStorage(string requestedStorage = null)
		{
			ITransactionalStorage newTransactionalStorage;
			string storageType = GetDefaultStorageType(requestedStorage);

			if (storageType == "munin")
				newTransactionalStorage = new Storage.Managed.TransactionalStorage(new RavenConfiguration { DataDirectory = DataDir, }, () => { });
			else
				newTransactionalStorage = new Storage.Esent.TransactionalStorage(new RavenConfiguration { DataDirectory = DataDir, }, () => { });

			newTransactionalStorage.Initialize(new DummyUuidGenerator(), new OrderedPartCollection<AbstractDocumentCodec>());
			return newTransactionalStorage;
		}
示例#4
0
		public ITransactionalStorage NewTransactionalStorage()
		{
			ITransactionalStorage newTransactionalStorage;
			string storageType = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("raventest_storage_engine"))
									 ? ConfigurationManager.AppSettings["Raven/StorageEngine"]
									 : Environment.GetEnvironmentVariable("raventest_storage_engine");

			if (storageType == "munin")
				newTransactionalStorage = new Storage.Managed.TransactionalStorage(new RavenConfiguration { DataDirectory = DataDir, }, () => { });
			else
				newTransactionalStorage = new Storage.Esent.TransactionalStorage(new RavenConfiguration { DataDirectory = DataDir, }, () => { });

			newTransactionalStorage.Initialize(new DummyUuidGenerator(), new OrderedPartCollection<AbstractDocumentCodec>());
			return newTransactionalStorage;
		}