Exemple #1
0
        // Token: 0x0600106B RID: 4203 RVA: 0x00014918 File Offset: 0x00012B18
        public static void Serialize(Stream stream, PackageView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.Bonus);
                if (instance.Items != null)
                {
                    ListProxy <int> .Serialize(memoryStream, instance.Items, new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 1;
                }
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 2;
                }
                DecimalProxy.Serialize(memoryStream, instance.Price);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemple #2
0
        // Token: 0x0600103A RID: 4154 RVA: 0x000127DC File Offset: 0x000109DC
        public static BundleView Deserialize(Stream bytes)
        {
            int        num        = Int32Proxy.Deserialize(bytes);
            BundleView bundleView = new BundleView();

            if ((num & 1) != 0)
            {
                bundleView.AndroidStoreUniqueId = StringProxy.Deserialize(bytes);
            }
            bundleView.ApplicationId = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                bundleView.Availability = ListProxy <ChannelType> .Deserialize(bytes, new ListProxy <ChannelType> .Deserializer <ChannelType>(EnumProxy <ChannelType> .Deserialize));
            }
            if ((num & 4) != 0)
            {
                bundleView.BundleItemViews = ListProxy <BundleItemView> .Deserialize(bytes, new ListProxy <BundleItemView> .Deserializer <BundleItemView>(BundleItemViewProxy.Deserialize));
            }
            bundleView.Category = EnumProxy <BundleCategoryType> .Deserialize(bytes);

            bundleView.Credits = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                bundleView.Description = StringProxy.Deserialize(bytes);
            }
            if ((num & 16) != 0)
            {
                bundleView.IconUrl = StringProxy.Deserialize(bytes);
            }
            bundleView.Id = Int32Proxy.Deserialize(bytes);
            if ((num & 32) != 0)
            {
                bundleView.ImageUrl = StringProxy.Deserialize(bytes);
            }
            if ((num & 64) != 0)
            {
                bundleView.IosAppStoreUniqueId = StringProxy.Deserialize(bytes);
            }
            bundleView.IsDefault  = BooleanProxy.Deserialize(bytes);
            bundleView.IsOnSale   = BooleanProxy.Deserialize(bytes);
            bundleView.IsPromoted = BooleanProxy.Deserialize(bytes);
            if ((num & 128) != 0)
            {
                bundleView.MacAppStoreUniqueId = StringProxy.Deserialize(bytes);
            }
            if ((num & 256) != 0)
            {
                bundleView.Name = StringProxy.Deserialize(bytes);
            }
            bundleView.Points = Int32Proxy.Deserialize(bytes);
            if ((num & 512) != 0)
            {
                bundleView.PromotionTag = StringProxy.Deserialize(bytes);
            }
            bundleView.USDPrice      = DecimalProxy.Deserialize(bytes);
            bundleView.USDPromoPrice = DecimalProxy.Deserialize(bytes);
            return(bundleView);
        }
Exemple #3
0
        // Token: 0x0600104D RID: 4173 RVA: 0x00013358 File Offset: 0x00011558
        public static void Serialize(Stream stream, CurrencyDepositView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.ApplicationId);
                if (instance.BundleId != null)
                {
                    Stream bytes    = memoryStream;
                    int?   bundleId = instance.BundleId;
                    Int32Proxy.Serialize(bytes, (bundleId == null) ? 0 : bundleId.Value);
                }
                else
                {
                    num |= 1;
                }
                if (instance.BundleName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.BundleName);
                }
                else
                {
                    num |= 2;
                }
                DecimalProxy.Serialize(memoryStream, instance.Cash);
                EnumProxy <ChannelType> .Serialize(memoryStream, instance.ChannelId);

                Int32Proxy.Serialize(memoryStream, instance.Cmid);
                Int32Proxy.Serialize(memoryStream, instance.Credits);
                Int32Proxy.Serialize(memoryStream, instance.CreditsDepositId);
                if (instance.CurrencyLabel != null)
                {
                    StringProxy.Serialize(memoryStream, instance.CurrencyLabel);
                }
                else
                {
                    num |= 4;
                }
                DateTimeProxy.Serialize(memoryStream, instance.DepositDate);
                BooleanProxy.Serialize(memoryStream, instance.IsAdminAction);
                EnumProxy <PaymentProviderType> .Serialize(memoryStream, instance.PaymentProviderId);

                Int32Proxy.Serialize(memoryStream, instance.Points);
                if (instance.TransactionKey != null)
                {
                    StringProxy.Serialize(memoryStream, instance.TransactionKey);
                }
                else
                {
                    num |= 8;
                }
                DecimalProxy.Serialize(memoryStream, instance.UsdAmount);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemple #4
0
        // Token: 0x060010EE RID: 4334 RVA: 0x00019114 File Offset: 0x00017314
        public static PlayerXPEventView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            PlayerXPEventView playerXPEventView = new PlayerXPEventView();

            if ((num & 1) != 0)
            {
                playerXPEventView.Name = StringProxy.Deserialize(bytes);
            }
            playerXPEventView.PlayerXPEventId = Int32Proxy.Deserialize(bytes);
            playerXPEventView.XPMultiplier    = DecimalProxy.Deserialize(bytes);
            return(playerXPEventView);
        }
Exemple #5
0
        // Token: 0x0600106C RID: 4204 RVA: 0x000149C4 File Offset: 0x00012BC4
        public static PackageView Deserialize(Stream bytes)
        {
            int         num         = Int32Proxy.Deserialize(bytes);
            PackageView packageView = new PackageView();

            packageView.Bonus = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                packageView.Items = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            if ((num & 2) != 0)
            {
                packageView.Name = StringProxy.Deserialize(bytes);
            }
            packageView.Price = DecimalProxy.Deserialize(bytes);
            return(packageView);
        }
Exemple #6
0
        // Token: 0x060010ED RID: 4333 RVA: 0x00019094 File Offset: 0x00017294
        public static void Serialize(Stream stream, PlayerXPEventView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.PlayerXPEventId);
                DecimalProxy.Serialize(memoryStream, instance.XPMultiplier);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemple #7
0
        // Token: 0x0600104E RID: 4174 RVA: 0x000134D0 File Offset: 0x000116D0
        public static CurrencyDepositView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            CurrencyDepositView currencyDepositView = new CurrencyDepositView();

            currencyDepositView.ApplicationId = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                currencyDepositView.BundleId = new int?(Int32Proxy.Deserialize(bytes));
            }
            if ((num & 2) != 0)
            {
                currencyDepositView.BundleName = StringProxy.Deserialize(bytes);
            }
            currencyDepositView.Cash      = DecimalProxy.Deserialize(bytes);
            currencyDepositView.ChannelId = EnumProxy <ChannelType> .Deserialize(bytes);

            currencyDepositView.Cmid             = Int32Proxy.Deserialize(bytes);
            currencyDepositView.Credits          = Int32Proxy.Deserialize(bytes);
            currencyDepositView.CreditsDepositId = Int32Proxy.Deserialize(bytes);
            if ((num & 4) != 0)
            {
                currencyDepositView.CurrencyLabel = StringProxy.Deserialize(bytes);
            }
            currencyDepositView.DepositDate       = DateTimeProxy.Deserialize(bytes);
            currencyDepositView.IsAdminAction     = BooleanProxy.Deserialize(bytes);
            currencyDepositView.PaymentProviderId = EnumProxy <PaymentProviderType> .Deserialize(bytes);

            currencyDepositView.Points = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                currencyDepositView.TransactionKey = StringProxy.Deserialize(bytes);
            }
            currencyDepositView.UsdAmount = DecimalProxy.Deserialize(bytes);
            return(currencyDepositView);
        }
Exemple #8
0
        // Token: 0x06001039 RID: 4153 RVA: 0x000125A8 File Offset: 0x000107A8
        public static void Serialize(Stream stream, BundleView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.AndroidStoreUniqueId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.AndroidStoreUniqueId);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.ApplicationId);
                if (instance.Availability != null)
                {
                    ListProxy <ChannelType> .Serialize(memoryStream, instance.Availability, new ListProxy <ChannelType> .Serializer <ChannelType>(EnumProxy <ChannelType> .Serialize));
                }
                else
                {
                    num |= 2;
                }
                if (instance.BundleItemViews != null)
                {
                    ListProxy <BundleItemView> .Serialize(memoryStream, instance.BundleItemViews, new ListProxy <BundleItemView> .Serializer <BundleItemView>(BundleItemViewProxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                EnumProxy <BundleCategoryType> .Serialize(memoryStream, instance.Category);

                Int32Proxy.Serialize(memoryStream, instance.Credits);
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 8;
                }
                if (instance.IconUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.IconUrl);
                }
                else
                {
                    num |= 16;
                }
                Int32Proxy.Serialize(memoryStream, instance.Id);
                if (instance.ImageUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.ImageUrl);
                }
                else
                {
                    num |= 32;
                }
                if (instance.IosAppStoreUniqueId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.IosAppStoreUniqueId);
                }
                else
                {
                    num |= 64;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsDefault);
                BooleanProxy.Serialize(memoryStream, instance.IsOnSale);
                BooleanProxy.Serialize(memoryStream, instance.IsPromoted);
                if (instance.MacAppStoreUniqueId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.MacAppStoreUniqueId);
                }
                else
                {
                    num |= 128;
                }
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 256;
                }
                Int32Proxy.Serialize(memoryStream, instance.Points);
                if (instance.PromotionTag != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PromotionTag);
                }
                else
                {
                    num |= 512;
                }
                DecimalProxy.Serialize(memoryStream, instance.USDPrice);
                DecimalProxy.Serialize(memoryStream, instance.USDPromoPrice);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }