コード例 #1
0
        private static BitSkinsInventory ReadBitSkinsInventory(dynamic bitskinsInventoryD)
        {
            BitSkinsInventory bitSkinsInventory = null;

            if (bitskinsInventoryD != null)
            {
                dynamic items = bitskinsInventoryD.items;

                int?   totalItems = bitskinsInventoryD.total_items ?? null;
                double?TotalPrice = bitskinsInventoryD.total_price ?? null;

                List <BitSkinsInventoryItem> bitSkinsInventoryItems = new List <BitSkinsInventoryItem>();
                if (items != null)
                {
                    foreach (dynamic item in items)
                    {
                        BitSkinsInventoryItem bitSkinsInventoryItem = ReadBitskinsInventoryItem(item);
                        bitSkinsInventoryItems.Add(bitSkinsInventoryItem);
                    }
                }

                bitSkinsInventory = new BitSkinsInventory(totalItems, TotalPrice, bitSkinsInventoryItems);
            }

            return(bitSkinsInventory);
        }
コード例 #2
0
 internal AccountInventory(SteamInventory steamInventory, BitSkinsInventory bitSkinsInventory,
                           PendingWithdrawalFromBitskinsInventory pendingWithdrawalFromBitskinsInventory)
 {
     SteamInventory    = steamInventory;
     BitSkinsInventory = bitSkinsInventory;
     PendingWithdrawalFromBitskinsInventory = pendingWithdrawalFromBitskinsInventory;
 }
コード例 #3
0
        private static AccountInventory ReadAccountInventory(string result)
        {
            dynamic responseServerD             = JsonConvert.DeserializeObject(result);
            dynamic steamInventoryD             = responseServerD.data.steam_inventory;
            dynamic bitskinsInventoryD          = responseServerD.data.bitskins_inventory;
            dynamic pendingWithdrawalInventoryD = responseServerD.data.pending_withdrawal_from_bitskins;

            SteamInventory    steamInventory    = ReadSteamInventory(steamInventoryD);
            BitSkinsInventory bitSkinsInventory = ReadBitSkinsInventory(bitskinsInventoryD);
            PendingWithdrawalFromBitskinsInventory pendingWithdrawalFromBitskinsInventory = ReadPendingWithdrawalFromBitskinsInventory(pendingWithdrawalInventoryD);

            AccountInventory accountInventorys = new AccountInventory(steamInventory, bitSkinsInventory, pendingWithdrawalFromBitskinsInventory);

            return(accountInventorys);
        }