AK.F1.Timing.Server.IO.ByteBuffer.CreateSnapshot C# (CSharp) Method

CreateSnapshot() public method

Creates a snapshot of this buffer.
public CreateSnapshot ( ) : ByteBufferSnapshot
return ByteBufferSnapshot
        public ByteBufferSnapshot CreateSnapshot()
        {
            return new ByteBufferSnapshot(_buffer, 0, _count);
        }

Usage Example

Ejemplo n.º 1
0
        public void can_create_snapshot()
        {
            var buffer = new ByteBuffer(1);

            var snapshot = buffer.CreateSnapshot();
            Assert.Equal(0, snapshot.Count);

            buffer.Append(new byte[] { 1 });
            snapshot = buffer.CreateSnapshot();
            Assert.Equal(1, snapshot.Count);
            AssertBufferEqual(new byte[] { 1 }, buffer);
        }
All Usage Examples Of AK.F1.Timing.Server.IO.ByteBuffer::CreateSnapshot