private bool CanOutput(int state) {
Debug.Assert(this.recordState != HaveRecord);
// If we have no record cached or the next event doesn't start new record, we are OK
if (this.recordState == NoRecord || (state & StateMachine.BeginRecord) == 0) {
return true;
}
else {
this.recordState = HaveRecord;
FinalizeRecord();
SetEmptyFlag(state);
return this.output.RecordDone(this) == Processor.OutputResult.Continue;
}
}