Esempio n. 1
0
        public void WriteU1(byte value)
        {
            var destination = new BufferDataDestination();
            var writer      = new BigEndianWriter(destination);

            writer.WriteU1(value);

            Verify(value, destination);
        }
        public void U2Length(ushort bytes)
        {
            using var destination = new BufferDataDestination();
            using (var writer = new BigEndianWriter(destination).WithU2Length())
            {
                for (int i = 0; i < bytes; i++)
                {
                    writer.WriteU1(123);
                }
            }

            var length = destination.Buffer[..2];