private async Task LoadActivitiesAsync()
        {
            var getAllActivitiesQuery  = new BrowseActivitiesForActivitiesPanel();
            var getAllActivitiesResult = await _dispatcher.DispatchQueryAndGetResultAsync <IEnumerable <ActivityForActivitiesPanel>, BrowseActivitiesForActivitiesPanel>(getAllActivitiesQuery);

            if (getAllActivitiesResult.Successful == false)
            {
                // TODO
                return;
            }

            foreach (var activity in getAllActivitiesResult.Result)
            {
                AddActivityItem(activity);
            }
        }
示例#2
0
        public async Task <IEnumerable <ActivityForActivitiesPanel> > HandleAndGetResultAsync(BrowseActivitiesForActivitiesPanel query)
        {
            var activities = await _activitiesRepository.BrowseAsync(new BrowseQuery());

            var activitiesForActivitiesPanel = activities.Select(activity => _activityForActivitiesPanelMapper.Map(activity));

            return(activitiesForActivitiesPanel);
        }