Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }