internal void dataRemoved(string key, DataNode data) { if (data == null) { Deleted(key, null); } else { Deleted(key, data.AsBranch()); } }
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()); // } //} }
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()); // } }