Пример #1
0
        public void GetMarketUsers(MarketUsersCallback callback, int?pageSize = null, int?page = null, bool?online = null, bool?recentlyJoined = null, string gender = null, int?minPrice = null, int?maxPrice = null, int?minRemainingLockTime = null, int?maxRemainingLockTime = null)
        {
            LogEventRequest_GetMarketUsers req = new LogEventRequest_GetMarketUsers();

            if (pageSize.HasValue)
            {
                req.Set_pageSize(pageSize.Value);
            }
            if (page.HasValue)
            {
                req.Set_page(page.Value);
            }
            if (online.HasValue)
            {
                req.Set_online(online.Value ? 1 : 0);
            }
            if (recentlyJoined.HasValue)
            {
                req.Set_recentlyJoined(recentlyJoined.Value ? 1 : 0);
            }

            req.Set_gender(string.IsNullOrEmpty(gender) ? "" : gender);

            if (minPrice.HasValue)
            {
                req.Set_minPrice(minPrice.Value);
            }
            if (maxPrice.HasValue)
            {
                req.Set_maxPrice(maxPrice.Value);
            }

            if (minRemainingLockTime.HasValue)
            {
                req.Set_minRemainingLockTime(minRemainingLockTime.Value);
            }
            if (maxRemainingLockTime.HasValue)
            {
                req.Set_maxRemainingLockTime(maxRemainingLockTime.Value);
            }

            req.Send((response) =>
            {
                if (callback != null)
                {
                    if (response.HasErrors)
                    {
                        callback(new MarketUsersReply(false, "GS failed to fetch market users, " + response.Errors.ToString()));
                    }
                    else
                    {
                        callback(CloudConverter.LogEventToMarketUsersReply(response));
                    }
                }
            });
        }
Пример #2
0
 public void GetMarketUsers(MarketUsersCallback callback, bool?online = null, bool?recentlyJoined = null, string gender = null, int?minPrice = null, int?maxPrice = null, int?page = null, int?pageSize = null)
 {
     cloudHandler.GetMarketUsers(callback, pageSize, page, online, recentlyJoined, gender, minPrice, maxPrice);
 }