コード例 #1
0
 internal AccountInventory(SteamInventory steamInventory, BitSkinsInventory bitSkinsInventory,
                           PendingWithdrawalFromBitskinsInventory pendingWithdrawalFromBitskinsInventory)
 {
     SteamInventory    = steamInventory;
     BitSkinsInventory = bitSkinsInventory;
     PendingWithdrawalFromBitskinsInventory = pendingWithdrawalFromBitskinsInventory;
 }
コード例 #2
0
        private static PendingWithdrawalFromBitskinsInventory ReadPendingWithdrawalFromBitskinsInventory(dynamic pendingWithdrawalInventoryD)
        {
            PendingWithdrawalFromBitskinsInventory pendingWithdrawalFromBitskinsInventory = null;

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

                int?totalItems = pendingWithdrawalInventoryD.total_items ?? null;

                List <PendingWithdrawalFromBitskinsInventoryItem> pendingWithdrawalFromBitskinsInventoryItems = new List <PendingWithdrawalFromBitskinsInventoryItem>();
                if (items != null)
                {
                    foreach (dynamic item in items)
                    {
                        PendingWithdrawalFromBitskinsInventoryItem pendingWithdrawalFromBitskinsInventoryItem = ReadPendingWithdrawalFromBitskinsInventoryItem(item);
                        pendingWithdrawalFromBitskinsInventoryItems.Add(pendingWithdrawalFromBitskinsInventoryItem);
                    }
                }

                pendingWithdrawalFromBitskinsInventory = new PendingWithdrawalFromBitskinsInventory(totalItems, pendingWithdrawalFromBitskinsInventoryItems);
            }

            return(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);
        }