Typo mistake. Should be ringbuffer.IsEmpty())