Reads raw bytes from the message into the given byte array. The buffer pointer that will be used to store the bytes. Should be of the same length as length or longer. The minimal amount of bytes that the buffer contains.
(byte* buffer, int length)
| 30 | /// </param> |
| 31 | /// <param name="length">The minimal amount of bytes that the buffer contains.</param> |
| 32 | public void ReadBytes(byte* buffer, int length) |
| 33 | { |
| 34 | Assert.IsTrue(Position + length <= Length, $"Could not read data of length {length} from message with id={MessageId} and size of {Length}B! Current read position={Position}"); |
| 35 | Utils.MemoryCopy(new IntPtr(buffer), new IntPtr(Buffer + Position), (ulong)length); |
| 36 | Position += (uint)length; |
| 37 | } |
| 38 | |
| 39 | /// <summary> |
| 40 | /// Writes raw bytes into the message. |
nothing calls this directly
no test coverage detected