public override INakedObjectPersistor CreateObjectPersistor() {
            Log.Info("installing " + GetType().FullName);

            var inMemoryObjectStore = new MemoryObjectStore();
            var persistor = new ObjectStorePersistor {
                ObjectStore = inMemoryObjectStore,
                PersistAlgorithm = new DefaultPersistAlgorithm(),
                OidGenerator = SimpleOidGeneratorStart.HasValue ? new SimpleOidGenerator(SimpleOidGeneratorStart.Value) : new TimeBasedOidGenerator()
            };
            var identityMapImpl = new IdentityMapImpl {
                IdentityAdapterMap = identityAdapterMap,
                PocoAdapterMap = new CreateIfNullPocoAdapterDecorator(inMemoryObjectStore, pocoAdapterMap ?? new PocoAdapterHashMap())
            };
            inMemoryObjectStore.IdentityMap = identityMapImpl;
            persistor.IdentityMap = identityMapImpl;
            return persistor;
        }
        public override INakedObjectPersistor CreateObjectPersistor() {
            Log.Info("installing " + GetType().FullName);

            if (objectStore == null) {
                objectStore = new XmlObjectStore {
                    Clock = new DefaultClock(),
                    XmlDirectory = XmlDirectory
                };
            }

            var persistAlgorithm = new DefaultPersistAlgorithm();
            var persistor = new ObjectStorePersistor {
                ObjectStore = objectStore,
                PersistAlgorithm = persistAlgorithm,
                OidGenerator = new TimeBasedOidGenerator(),
                IdentityMap = new IdentityMapImpl {IdentityAdapterMap = identityAdapterMap, PocoAdapterMap = pocoAdapterMap}
            };
            return persistor;
        }
        public override INakedObjectPersistor CreateObjectPersistor()
        {
            Log.Info("installing " + GetType().FullName);

            if (objectStore == null)
            {
                objectStore = new XmlObjectStore {
                    Clock        = new DefaultClock(),
                    XmlDirectory = XmlDirectory
                };
            }

            var persistAlgorithm = new DefaultPersistAlgorithm();
            var persistor        = new ObjectStorePersistor {
                ObjectStore      = objectStore,
                PersistAlgorithm = persistAlgorithm,
                OidGenerator     = new TimeBasedOidGenerator(),
                IdentityMap      = new IdentityMapImpl {
                    IdentityAdapterMap = identityAdapterMap, PocoAdapterMap = pocoAdapterMap
                }
            };

            return(persistor);
        }