示例#1
0
        private async Task addValueAsync()
        {
            decimal           price        = Convert.ToDecimal(entryPrecio.Text, System.Globalization.CultureInfo.CurrentCulture);
            var               tokenSource2 = new CancellationTokenSource();
            CancellationToken ct           = tokenSource2.Token;

            try
            {
                await FirebaseHelper.AddActividad(entryTitulo.Text, entryLugar.Text, editorDescripcion.Text, entryFoto.Text, pickerBus.Title, price, fechaAct.Date, Int32.Parse(entryPlazas.Text));
            }
            catch (OperationCanceledException e)
            {
                Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
            }
            finally
            {
                tokenSource2.Dispose();
                Navigation.PopModalAsync();
            }
        }