public override BigDecimal FromBigEndian(byte[] value) { var scaleBytes = new byte[4]; var numberBytes = new byte[value.Length - 4]; Array.Copy(value, 0, scaleBytes, 0, scaleBytes.Length); Array.Copy(value, scaleBytes.Length, numberBytes, 0, numberBytes.Length); var int32Converter = new Int32TypeConverter(); var bigIntegerConverter = new IntegerTypeConverter(); var scale = int32Converter.FromBigEndian(scaleBytes); var number = bigIntegerConverter.FromBigEndian(numberBytes); return(new BigDecimal(number, scale)); }
public override void SetValueFromBigEndian(byte[] value) { _value = Converter.FromBigEndian(value); }