private void ShowComposer(Func <string, Task> workFn) { var composer = new MarkdownComposerViewController(); composer.PresentAsModal(this, async text => { var hud = composer.CreateHud(); using (UIApplication.SharedApplication.DisableInteraction()) using (_networkActivityService.ActivateNetwork()) using (hud.Activate("Commenting...")) { try { await workFn(text); composer.DismissViewController(true, null); } catch (Exception e) { AlertDialogService.ShowAlert("Unable to Comment", e.Message); } } }); }
public Task <IResponse> Send(IRequest request, System.Threading.CancellationToken cancellationToken) { request.Headers["Accept"] = "application/vnd.github.v3+json; charset=utf-8"; using (_networkActivity.ActivateNetwork()) return(_httpClient.Send(request, cancellationToken)); }
public System.Threading.Tasks.Task <StoreKit.SKProductsResponse> RequestProductData(params string[] productIds) { using (_networkActivity.ActivateNetwork()) return(_inAppPurcahseService.RequestProductData(productIds)); }
public async Task <IResponse> Send(IRequest request, System.Threading.CancellationToken cancellationToken) { using (_networkActivity.ActivateNetwork()) return(await _httpClient.Send(request, cancellationToken)); }