protected virtual bool UpKeep(bool force = false) { if (!force && !Keep.IsChanged) { if (!Keep.QuickMode && FChangeIndexOut.SliceCount != 0) { FChangeIndexOut.FlushNil(); FChangeOut.FlushNil(); } return(false); } if (Keep.QuickMode) { Keep.Sync(); } else { IEnumerable <Message> changes; IEnumerable <int> indexes; changes = Keep.Sync(out indexes); FChangeIndexOut.FlushResult(indexes); FChangeOut.FlushResult(changes); } FOutput.FlushResult(Keep); FCountOut.FlushInt(Keep.Count); return(true); }