Raven.Storage.Esent.TransactionalStorage.ExecuteBatch C# (CSharp) Method

ExecuteBatch() private method

private ExecuteBatch ( Action action ) : void
action Action
return void
		private void ExecuteBatch(Action<IStorageActionsAccessor> action)
		{
			var txMode = configuration.TransactionMode == TransactionMode.Lazy
				? CommitTransactionGrbit.LazyFlush
				: CommitTransactionGrbit.None;
			using (var pht = new DocumentStorageActions(instance, database, tableColumnsCache, DocumentCodecs, generator, documentCacher))
			{
				current.Value = new StorageActionsAccessor(pht);
				action(current.Value);
				pht.Commit(txMode);
			}
		}