Ejemplo n.º 1
0
        private List <Tracker> BuildTracker()
        {
            var trackerList = new List <Tracker>();

            trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.CURRENT_WEIGHT,
                                                            CurrentWeightValue.ToString()));

            trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.CURRENT_WEIGHT_UI,
                                                            CurrentWeightValue.ToString()));

            trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.WEIGHT_VOLUME_TYPE,
                                                            App.Configuration.AppConfig.DefaultWeightVolume));

            if (GoalAchieved)
            {
                trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.TSHIRT_SIZE,
                                                                TShirtSize.Trim()));
                trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.FRONT_IMAGE,
                                                                ImageFront.Trim()));
                trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.SIDE_IMAGE,
                                                                ImageSide.Trim()));
                trackerList.Add(_trackerPivotService.AddTracker(TrackerConstants.ABOUT_JOURNEY,
                                                                AboutYourJourney.Trim()));
            }

            return(trackerList);
        }
Ejemplo n.º 2
0
        private async Task <List <Tracker> > BuildTracker()
        {
            var trackerList = new List <Tracker>();
            await Task.Run(async() =>
            {
                trackerList.Add(await trackerService.AddTracker(TrackerConstants.CURRENT_WEIGHT,
                                                                CurrentWeightValue.ToString()));
                if (GoalAchieved)
                {
                    trackerList.Add(await trackerService.AddTracker(TrackerConstants.TSHIRT_SIZE,
                                                                    TShirtSize.Trim()));
                    trackerList.Add(await trackerService.AddTracker(TrackerConstants.FRONT_IMAGE,
                                                                    ImageFront.Trim()));
                    trackerList.Add(await trackerService.AddTracker(TrackerConstants.SIDE_IMAGE,
                                                                    ImageSide.Trim()));
                    trackerList.Add(await trackerService.AddTracker(TrackerConstants.ABOUT_JOURNEY,
                                                                    AboutYourJourney.Trim()));
                }
            });

            return(trackerList);
        }