(ushort value)
| 56 | } |
| 57 | |
| 58 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
| 59 | public void WriteUInt16(ushort value) |
| 60 | { |
| 61 | EnsureCapacity(2); |
| 62 | int index = _count; |
| 63 | if (BitConverter.IsLittleEndian) |
| 64 | { |
| 65 | Unsafe.WriteUnaligned(ref _storage[index], value); |
| 66 | } |
| 67 | else |
| 68 | { |
| 69 | BinaryPrimitives.WriteUInt16LittleEndian(_storage.AsSpan(index, 2), value); |
| 70 | } |
| 71 | |
| 72 | _count = index + 2; |
| 73 | } |
| 74 | |
| 75 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
| 76 | public void WriteInt16(short value) |
no outgoing calls