public bool ShouldLoadFullData <T>(ref T objectValue) where T : class { // Read info about storage format ComplexTypeStorageFormats format = (ComplexTypeStorageFormats)SerializerStorage.ReadStorageFormatId(ComplexTypeStorageBase.FormatIdSizeInBits); // Case: null object if (format == ComplexTypeStorageFormats.NullObject) { objectValue = null; return(false); } // If caching has been activated if (SerializerStorage.UseRefCaching) { // Deserialize object ID this.ObjectId = WKTSerializers.Int32.Deserialize(); // Case: cached object if (format == ComplexTypeStorageFormats.CachedObject) { objectValue = ObjectCache.GetObjectValueForRefTypeField <T>(this); return(false); } } // Case: normal object - load full data return(true); }
// Constructor that requires config case value public ComplexTypeStorageBase(ComplexTypeStorageFormats confCase, byte usedConfigBits) : base((byte)confCase, FormatIdSizeInBits, usedConfigBits) { }