コード例 #1
0
        private async void SetupSampleData()
        {
            var items = await SampleData.GetEventFeed();

            foreach (var item in items)
            {
                FeatureEvents.Add(item);
                MyEvents.Add(item);
                AllEvents.Add(item);
            }
        }
コード例 #2
0
        public async Task GetFeatureEvents()
        {
            var feedResultEntity =
                await
                _eventManager.GetFeaturedEvents(Locator.ViewModels.MainPageVm.CurrentTokens, "recommendInGame",
                                                Locator.ViewModels.MainPageVm.CurrentUser.Region);

            var result = await ResultChecker.CheckSuccess(feedResultEntity);

            if (!result)
            {
                return;
            }
            var feedEntity = JsonConvert.DeserializeObject <EventsResponse>(feedResultEntity.ResultJson);

            foreach (var feed in feedEntity.Events)
            {
                FeatureEvents.Add(feed);
            }
        }