/// <summary> /// Read messages from this message block /// </summary> public IEnumerable<Message> ReadMessages() { using (var reader = new MessageReader(new BinaryMemoryStream(Data))) { Message message; while ((message = reader.ReadMessage()) != null) yield return message; } }
/// <summary> /// Read messages from this message block /// </summary> public IEnumerable <Message> ReadMessages() { using (var reader = new MessageReader(new BinaryMemoryStream(Data))) { Message message; while ((message = reader.ReadMessage()) != null) { yield return(message); } } }