コード例 #1
0
ファイル: WithdrawItem.cs プロジェクト: dmitrydnl/BitSkinsApi
        private static List <WithdrawnItem> ReadWithdrawnItems(dynamic itemsD)
        {
            List <WithdrawnItem> withdrawnItems = new List <WithdrawnItem>();

            if (itemsD != null)
            {
                foreach (dynamic item in itemsD)
                {
                    WithdrawnItem withdrawnItem = ReadWithdrawnItem(item);
                    withdrawnItems.Add(withdrawnItem);
                }
            }

            return(withdrawnItems);
        }
コード例 #2
0
ファイル: WithdrawItem.cs プロジェクト: dmitrydnl/BitSkinsApi
        private static WithdrawnItem ReadWithdrawnItem(dynamic item)
        {
            Market.AppId.AppName?appId = null;
            if (item.app_id != null)
            {
                appId = (Market.AppId.AppName)(int) item.app_id;
            }
            string   itemId         = item.item_id ?? null;
            DateTime?withdrawableAt = null;

            if (item.withdrawable_at != null)
            {
                withdrawableAt = DateTimeExtension.FromUnixTime((long)item.withdrawable_at);
            }

            WithdrawnItem withdrawnItem = new WithdrawnItem(appId, itemId, withdrawableAt);

            return(withdrawnItem);
        }