示例#1
0
 internal void dataRemoved(string key, DataNode data)
 {
     if (data == null)
     {
         Deleted(key, null);
     }
     else
     {
         Deleted(key, data.AsBranch());
     }
 }
示例#2
0
 internal void dataChanged(string key, DataNode data)
 {
     //var realdata = dataCache[key];
     //if (realdata.NotContains(data))
     //{
     //    if (realdata.IsLeaf != data.IsLeaf || realdata.IsLeaf)
     //    {
     //        dataCache[key] = data;
     //    }
     //    else
     //    {
     //        DataBranch dataBranch = data.AsBranch();
     //        realdata.Merge(dataBranch);
     //Changed(key, realdata.AsBranch());
     Changed(key, data.AsBranch());
     //    }
     //}
 }
示例#3
0
 internal void dataAdded(string key, DataNode data)
 {
     //DataBranch dataBranch = data.AsBranch();
     //if (dataCache.ContainsKey(key))
     //{
     //    //i had something here.
     //    var realdata = dataCache[key];
     //    if (realdata == null || realdata.NotContains(dataBranch))
     //    {
     //        dataCache[key] = data;
     //        Added(key, dataBranch);
     //    }
     //}
     //else
     //{
     //    dataCache[key] = data;
     Added(key, data.AsBranch());
     // }
 }