Example #1
0
        private LuckyInfo GetLastLuckyInfo(JArray records)
        {
            LuckyInfo info = new LuckyInfo();

            info.sns_username = records[records.Count - 1].Value <string>("sns_username");
            info.amount       = records[records.Count - 1].Value <string>("amount");
            return(info);
        }
Example #2
0
        private LuckyInfo GetLuckyInfo(JArray records)
        {
            LuckyInfo info = new LuckyInfo();

            foreach (JObject item in records)
            {
                if (item.Value <bool>("is_lucky"))
                {
                    info.sns_username = item.Value <string>("sns_username");
                    info.amount       = item.Value <string>("amount");
                    break;
                }
            }
            return(info);
        }