private async Task doUpdateAsync() { int opt = 2; if (tipo == "Administrador") { opt = 1; } else if (tipo == "Básico") { opt = 0; } var tokenSource2 = new CancellationTokenSource(); CancellationToken ct = tokenSource2.Token; try { await FirebaseHelper.UpdateUser(Convert.ToInt32(usuario.ID), entryName.Text, entryApellidos.Text, entryDNI.Text, opt, usuario.DNI); } catch (OperationCanceledException e) { Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}"); } finally { tokenSource2.Dispose(); Navigation.PopModalAsync(); } }