// Constructor public Serializer() { RefObjectsCache = new RefTypeObjectsDictionary(); ValObjectsCache = new ValueTypeObjectsDictionary(); // Compression factory CompressionFactory = new CompressionFactory(); ActiveCompressionType = CompressionType.Internal; ActiveCompressionLevel = 1; // Fast compression // Above this value we start compressing resulting stream CompressionThreshold = 100; StorageFormatIds = new StorageFormatIdsSerStore(); StorageFormatData = new StorageFormatDataSerStore(); PackedData = new PackedDataSerStore(); // Turn off caching by default UseCaching = false; // Instance serializers WKTSerializers = new WKTSerializers(SerializerStorage, ValObjectsCache); }
// Constructor public ComplexTypeSerializerBase(ISerializerStorage serializerStorage, IRefTypeObjectsDictionary refObjectCache, IValueTypeObjectsDictionary valObjectsCache) : base(serializerStorage, refObjectCache) { ValObjectsCache = valObjectsCache; WKTSerializers = serializerStorage.WKTSerializers; }