public static decimal NextDecimal(this IBufferedArray buffer, IByteConverter converter)
    {
        SharedContracts(buffer, converter);

        buffer.BufferNextExceptionChecking(ByteLength.Decimal);
        return(converter.ToDecimal(buffer.Buffer, 0));
    }
    public static bool TryNextDecimal(this IBufferedArray buffer, IByteConverter converter, out decimal value)
    {
        SharedContracts(buffer, converter);

        if (buffer.TryBufferNext(ByteLength.Decimal))
        {
            value = converter.ToDecimal(buffer.Buffer, 0);
            return(true);
        }
        else
        {
            value = default(decimal);
            return(false);
        }
    }
    public static decimal ToDecimal(this IByteConverter converter, byte[] buffer, int index)
    {
        Contracts.Requires.That(converter != null);

        return(converter.ToDecimal(buffer, ref index));
    }