Пример #1
0
        public License Deserialize(string key, IDecoder decoder)
        {
            byte[] array = Base32Decoder.Decode(key);
            if (OldLicenseSerializer.IsEmpty(array))
            {
                return(null);
            }
            byte[] array2 = decoder.Decode(array);
            if (OldLicenseSerializer.IsEmpty(array2))
            {
                return(null);
            }
            License result;

            using (MemoryStream memoryStream = new MemoryStream(array2))
            {
                License license = OldLicenseSerializer.ReadLicenseFromStream(memoryStream);
                result = license;
            }
            return(result);
        }