public static int NextInt(this IBufferedArray buffer, IByteConverter converter) { SharedContracts(buffer, converter); buffer.BufferNextExceptionChecking(ByteLength.Int); return(converter.ToInt(buffer.Buffer, 0)); }
public static bool TryNextInt(this IBufferedArray buffer, IByteConverter converter, out int value) { SharedContracts(buffer, converter); if (buffer.TryBufferNext(ByteLength.Int)) { value = converter.ToInt(buffer.Buffer, 0); return(true); } else { value = default(int); return(false); } }
public static int ToInt(this IByteConverter converter, byte[] buffer, int index) { Contracts.Requires.That(converter != null); return(converter.ToInt(buffer, ref index)); }