void IDataLoggable.CollectChangeLogs(string parent, IList <DataLog> logs) { for (int i = 0, imax = mRemoved.Count; i < imax; i++) { logs.Add(DataLog.Delete(parent, mRemoved[i])); } for (int i = 0; i < _size; i++) { Node n = _items[i]; if (n.s == 0) { continue; } string p = RTSListUtil.ToKey(n.p); if (n.s >= 2) { logs.Add(n.s > 2 ? DataLog.Create(parent, p, n.v) : DataLog.Modify(parent, p, n.v)); continue; } IDataLoggable d = n.v as IDataLoggable; if (d != null) { d.CollectChangeLogs(string.IsNullOrEmpty(parent) ? p : (parent + "." + p), logs); } } }
void IDataLoggable.CollectChangeLogs(string parent, IList <DataLog> logs) { for (int i = 0, imax = mRemoved.Count; i < imax; i++) { logs.Add(DataLog.Delete(parent, mRemoved[i])); } for (int i = 0; i < count; i++) { Entry entry = entries[i]; if (entry.hashCode < 0 || entry.s == 0) { continue; } if (entry.s >= 2) { logs.Add(entry.s > 2 ? DataLog.Create(parent, entry.key, entry.value) : DataLog.Modify(parent, entry.key, entry.value)); continue; } IDataLoggable d = entry.value as IDataLoggable; if (d != null) { d.CollectChangeLogs(string.IsNullOrEmpty(parent) ? entry.key : (parent + "." + entry.key), logs); } } }