MCPcopy Create free account
hub / github.com/apache/fory / WriteUInt16

Method WriteUInt16

csharp/src/Fory/ByteBuffer.cs:58–73  ·  view source on GitHub ↗
(ushort value)

Source from the content-addressed store, hash-verified

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)

Callers 15

WriteDataMethod · 0.80
WriteDataMethod · 0.80
WriteDataMethod · 0.80
WriteMethod · 0.80
WriteMethod · 0.80
WriteMethod · 0.80
WriteDataMethod · 0.80
WriteDataMethod · 0.80
WriteDataMethod · 0.80
WriteDataMethod · 0.80
WriteDataMethod · 0.80
WriteDataMethod · 0.80

Calls

no outgoing calls

Tested by 1