コード例 #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);
            }
        }
コード例 #2
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);
            }
        }
コード例 #3
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);
            }
        }
コード例 #4
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);
            }
        }