public static new OscBundle Parse(BinaryReader reader) { OscString bundleString = OscString.Parse(reader); OscTimeTag timeTag = OscTimeTag.Parse(reader); List <OscPacket> contents = new List <OscPacket>(); while (reader.BaseStream.Position < reader.BaseStream.Length) { OscInt size = OscInt.Parse(reader); OscPacket packet = OscPacket.Parse(reader); contents.Add(packet); } return(new OscBundle(timeTag.Contents, contents)); }
public static new OscMessage Parse(BinaryReader reader) { OscString address = OscString.Parse(reader); OscString typeTags = OscString.Parse(reader); int valueCount = typeTags.Contents.Length - 1; List <IOscValue> values = new List <IOscValue>(); foreach (char current in typeTags.Contents.Substring(1)) { IOscValue value = OscValue.Parse(current, reader); values.Add(value); } return(new OscMessage(address.Contents, values)); }