Exemple #1
0
        private async void GetUserProgressAsync()
        {
            var baseEventData = new BaseEventDataViewModel();

            if (Application.internetReachability == NetworkReachability.NotReachable)
            {
                PROBA.UserProgressCanceled(RequestResponse.NoInternet);
                return;
            }
            try
            {
                var(success, statusCode, configurations) = await _probaHttpClient.GetUserDataAsync(baseEventData);

                if (!success)
                {
                    PROBA.UserProgressCanceled(RequestResponse.Error);
                }

                PROBA.UserDataReceived(configurations.Progress, configurations.Configurations);
            }
            catch (Exception e)
            {
                PROBA.UserProgressCanceled(RequestResponse.Error);
                _probaLogger.LogError(e.Message, e.StackTrace);
            }
        }