Ejemplo n.º 1
0
        private async void ExsitingCheckProgressionStatusAsync(BaseEventDataViewModel baseEvent)
        {
            if (Application.internetReachability == NetworkReachability.NotReachable || _sending)
            {
                OldRecordCouldNotSent();
                return;
            }
            try
            {
                var(success, statusCode, progressionStatus) = await _probaHttpClient.CheckProgressionStatusAsync(baseEvent);

                if (!success)
                {
                    OldRecordCouldNotSent();
                    return;
                }
                PROBA.ProgressionStatusReceived(progressionStatus);
                OldRecordSent();
            }
            catch (Exception e)
            {
                _probaLogger.LogError(e.Message, e.StackTrace);
                OldRecordCouldNotSent();
            }
        }
Ejemplo n.º 2
0
        private async void CheckProgressionStatusAsync()
        {
            var baseEvent = new BaseEventDataViewModel();

            if (Application.internetReachability == NetworkReachability.NotReachable || _sending)
            {
                SaveCheckProgressionStatusInDB(baseEvent);
                return;
            }
            try
            {
                var(success, statusCode, progressionStatus) = await _probaHttpClient.CheckProgressionStatusAsync(baseEvent);

                if (!success)
                {
                    SaveCheckProgressionStatusInDB(baseEvent);
                    return;
                }
                PROBA.ProgressionStatusReceived(progressionStatus);
            }
            catch (Exception e)
            {
                _probaLogger.LogError(e.Message, e.StackTrace);
                SaveCheckProgressionStatusInDB(baseEvent);
            }
        }