Ejemplo n.º 1
0
            protected override string RunInBackground(params string[] @params)
            {
                try
                {
                    var markdown = "";
                    var url      = @params[0];
                    this.cssFileUrl = @params[1];
                    if (URLUtil.IsNetworkUrl(url))
                    {
                        HttpClient c = new HttpClient();
                        markdown = MyIssues.Util.AsyncHelpers.RunSync(() => c.GetStringAsync(new Uri(url)));
                    }
                    else if (URLUtil.IsAssetUrl(url))
                    {
                        markdown = _parent.ReadFileFromAsset(url.Substring("file:///android_asset/".Length));
                        //throw new NotImplementedException();
                    }
                    else
                    {
                        throw new ArgumentException("The URL string provided is not a network URL or Asset URL.", nameof(url));
                    }

                    return(markdown);
                }
                catch (Exception ex)
                {
                    Log.Debug(TAG, "Error Loading Markdown File.", ex);
                    return(null);
                }
            }
Ejemplo n.º 2
0
        private async void CreatePayment(string token, UserToken userToken)
        {
            var securityUri = await CheckoutService.CreatePayment(token, userToken);

            if (securityUri == null)
            {
                return;
            }
            if (URLUtil.IsHttpsUrl(securityUri.AbsoluteUri) || URLUtil.IsAssetUrl(securityUri.AbsoluteUri))
            {
                StartActivityForResult(Checkout.Create3dsIntent(this, securityUri.AbsoluteUri), RequestCode3Ds);
            }
        }