private static void AssertAsciiToDecimal(string input, decimal expected) { var buf = Encoding.ASCII.GetBytes(input); var actual = NumericBuffer.AsciiToDecimal(buf); Assert.AreEqual(expected, actual, $"Failed '{input}'"); }
public override double DecodeText(DataRow row, PostgresClientState state) { return((double)NumericBuffer.AsciiToDecimal(row.Data, row.Length)); }