public static int ReadTimestamp(ReadOnlySpan <byte> span, out AmqpTimestamp value) { // 0-9 is afaict silent on the signedness of the timestamp. // See also MethodArgumentWriter.WriteTimestamp and AmqpTimestamp itself value = new AmqpTimestamp((long)NetworkOrderDeserializer.ReadUInt64(span)); return(8); }
public ulong ReadLonglong() { ulong result = NetworkOrderDeserializer.ReadUInt64(_memory.Slice(_memoryOffset)); _memoryOffset += 8; return(result); }
public ulong ReadLonglong() { ulong result = NetworkOrderDeserializer.ReadUInt64(Span); _offset += 8; return(result); }
public static AmqpTimestamp ReadTimestamp(ReadOnlyMemory <byte> memory) { ulong stamp = NetworkOrderDeserializer.ReadUInt64(memory); // 0-9 is afaict silent on the signedness of the timestamp. // See also MethodArgumentWriter.WriteTimestamp and AmqpTimestamp itself return(new AmqpTimestamp((long)stamp)); }
///<summary> /// Fill this instance from the given byte buffer stream. ///</summary> internal ulong ReadFrom(ReadOnlyMemory <byte> memory) { // Skipping the first two bytes since they arent used (weight - not currently used) ulong bodySize = NetworkOrderDeserializer.ReadUInt64(memory.Slice(2)); ReadPropertiesFrom(new ContentHeaderPropertyReader(memory.Slice(10))); return(bodySize); }
public void TestReadUInt64() { Assert.Equal(0x89ABCDEF01234567, NetworkOrderDeserializer.ReadUInt64(new byte[] { 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67 }.AsSpan())); }
public static int ReadLonglong(ReadOnlySpan <byte> span, out ulong value) { value = NetworkOrderDeserializer.ReadUInt64(span); return(8); }