Beispiel #1
0
        public WritingGamePage()
        {
            InitializeComponent();

            var client = new RestClient("http://localhost:52958/");

            _mobileApiClient = new MobileApiService(client);
            vm             = new WritingGameViewModel(_mobileApiClient);
            BindingContext = vm;
        }
Beispiel #2
0
        public override Result DoWork()
        {
            Log.Debug(TAG, $"Start Sending token to API");

            var service = new MobileApiService();

            string userId   = this.InputData.GetString(UserIdParamName);
            string appToken = this.InputData.GetString(AppTokenParamName);

            var isSuccess = service.SendAndroidTokenToApiAsync(userId, appToken).Result;

            if (isSuccess)
            {
                Log.Debug(TAG, $"End Sending token to API");

                return(Result.InvokeSuccess());
            }

            return(Result.InvokeRetry());
        }