예제 #1
0
        public static RemoteData parseRemoteData(DBResult ds)
        {
            string     json = ds.getRawJsonValue();
            RemoteData rd   = JsonConvert.DeserializeObject <RemoteData>(json);

            if (string.IsNullOrEmpty(rd.pid) && string.IsNullOrEmpty(rd.pid))
            {
                return(null);
            }
            rd.setSource(json);
            return(rd);
        }
예제 #2
0
        private void onValueChanged(DBResult ea)
        {
            string s = ea.getRawJsonValue();

            if (!string.IsNullOrEmpty(s))
            {
                RemoteData rd = JsonConvert.DeserializeObject <RemoteData>(s);
                rd.setSource(s);
                if (!string.Equals(rd.sid, FirebaseManager.getMePid()))
                {
                    valueChangedListeners.ForEach(l => {
                        l(rd);
                    });
                }
            }
            initCallback.done();
        }