//public IStorageEngine StorageEngine { get; } //Used when data does not already exists private ObjectStore2(IStorageEngine storageEngine) { var serializerFactories = new SerializerFactories(SerializerFactories.DefaultFactories); var mapAndSerializers = new MapAndSerializers(serializerFactories); var roots = new Roots2(); Roots = roots; mapAndSerializers.GetOrCreateSerializerFor(roots); _persister = new Persister2(storageEngine, mapAndSerializers); }
//Used when data exists private ObjectStore2(IRoots2 roots, MapAndSerializers mapAndSerializers, IStorageEngine storageEngine) { Roots = roots; _persister = new Persister2(storageEngine, mapAndSerializers); }