示例#1
0
        private void GetTrip(string key)
        {
            Action <Dictionary <string, TripModel> > onValueEvent = (Dictionary <string, TripModel> trips) =>
            {
                try
                {
                    System.Diagnostics.Debug.WriteLine("---> EVENT Get Request Data FromFirebase ");

                    Action onSetValueSuccess = () =>
                    {
                    };

                    Action <string> onSetValueError = (string errorDesc) =>
                    {
                    };

                    if (trips != null && trips.Count > 0)
                    {
                        foreach (KeyValuePair <string, TripModel> item in trips)
                        {
                            if (item.Value.Key == key)
                            {
                                SetTrip(item.Value);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine("---> error Get Request Data FromFirebase " + ex.Message);
                    throw;
                }
            };

            _firebaseDatabase.GetTrips("trips", onValueEvent);
        }