public void FirebaseObserveEventChildRemoved <T>(string nodeKey, Action <T> action) { DatabaseReference dr = FirebaseDatabase.Instance.GetReference(nodeKey); ValueEventListener <T> listener = new ValueEventListener <T>(action); dr.AddValueEventListener(listener); DatabaseReferences.Add(nodeKey, dr); ValueEventListeners.Add(nodeKey, listener); }
public void AddValueEvent <T>(string nodeKey, Action <T> action) { DatabaseReference dr = GetDatabaseReference(nodeKey); if (dr != null) { ValueEventListener <T> listener = new ValueEventListener <T>(action); dr.AddValueEventListener(listener); ValueEventListeners.Add(nodeKey, listener); } }