public static double ReadDouble(ByteBuffer buffer, byte formatCode) { if (formatCode == FormatCode.Double) { return AmqpBitConverter.ReadDouble(buffer); } else { throw InvalidFormatCodeException(formatCode, buffer.Offset); } }