public static long NextLong(this IBufferedArray buffer, IByteConverter converter)
    {
        SharedContracts(buffer, converter);

        buffer.BufferNextExceptionChecking(ByteLength.Long);
        return(converter.ToLong(buffer.Buffer, 0));
    }
    public static bool TryNextLong(this IBufferedArray buffer, IByteConverter converter, out long value)
    {
        SharedContracts(buffer, converter);

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

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