Esempio n. 1
0
        // Deserialization
        public SByte Deserialize()
        {
            // Read info about storage format
            ByteStorageFormats format = (ByteStorageFormats)SerializerStorage.ReadStorageFormatId(ByteStorageBase.FormatIdSizeInBits);

            // Is it default value
            if (format == ByteStorageFormats.DefaultValue)
            {
                return(0);
            }

            // Value stored in PackedData
            byte[] encodedValue = SerializerStorage.ReadPackedData(1);

            // Return decoded value
            return((SByte)encodedValue[0]);
        }
Esempio n. 2
0
 // Constructor that requires config case value
 public ByteStorageBase(ByteStorageFormats confCase, byte usedConfigBits) : base((byte)confCase, FormatIdSizeInBits, usedConfigBits)
 {
 }