public static void ReadFrom(BinaryReader reader, FIXGroup group) { int num = reader.ReadInt32(); for (int index = 0; index < num; ++index) { int tag = reader.ReadInt32(); FIXType fixType = EFIXFieldTypes.GetFIXType(tag); switch (fixType) { case FIXType.Bool: group.AddBoolField(tag, reader.ReadBoolean()); break; case FIXType.Int: group.AddIntField(tag, reader.ReadInt32()); break; case FIXType.Double: group.AddDoubleField(tag, reader.ReadDouble()); break; case FIXType.Char: group.AddCharField(tag, reader.ReadChar()); break; case FIXType.String: group.AddStringField(tag, reader.ReadString()); break; case FIXType.DateTime: group.AddDateTimeField(tag, new DateTime(reader.ReadInt64())); break; default: throw new ArgumentException("" + fixType.ToString()); } } }