Ejemplo n.º 1
0
        public PersistableChunkFactory(
            IAsyncFactory <TKey, IDisposableValue <TChunk> > factory,
            IChunkPersister <TChunk, TPersistable> converter)
        {
            Contracts.Requires.That(factory != null);
            Contracts.Requires.That(converter != null);

            this.factory   = factory;
            this.converter = converter;
        }
        public SkyIslandMapChunkStorePopulator(
            IChunkStore <ChunkOverheadKey, SerializedSkyIslandMapChunk> store,
            IChunkPersister <ISkyIslandMapChunk, SerializedSkyIslandMapChunk> persister,
            IChunkPopulator <ISkyIslandMapChunk> fallback)
        {
            Contracts.Requires.That(store != null);
            Contracts.Requires.That(persister != null);
            Contracts.Requires.That(fallback != null);

            this.store     = store;
            this.persister = persister;
            this.fallback  = fallback;
        }
        public VoxelGridChunkStorePopulator(
            IChunkStore <ChunkKey, SerializedVoxelGridChunk> store,
            IChunkPersister <IVoxelGridChunk, SerializedVoxelGridChunk> persister,
            IChunkPopulator <IVoxelGridChunk> fallback)
        {
            Contracts.Requires.That(store != null);
            Contracts.Requires.That(persister != null);
            Contracts.Requires.That(fallback != null);

            this.store     = store;
            this.persister = persister;
            this.fallback  = fallback;
        }
Ejemplo n.º 4
0
 public static IAsyncFactory <TKey, TPersistable> Create <TKey, TChunk, TPersistable>(
     IAsyncFactory <TKey, IDisposableValue <TChunk> > factory,
     IChunkPersister <TChunk, TPersistable> converter) =>
 new PersistableChunkFactory <TKey, TChunk, TPersistable>(factory, converter);