private static IEnumerable <IOData> GetIOData(ByteReader input, int eventBytes, bool extended) { List <IOData> data = new List <IOData>(); byte ioDataCount = input.GetOne(); for (int i = 0; i < ioDataCount; i++) { data.Add(new IOData { Id = extended ? input.GetLe <short>() : input.GetOne(), Value = input.Get(eventBytes) }); } return(data); }