C# support for directly reading and writting to memory other than byte[]. For example, ByteBuffer can be initialized with a custom allocator which uses shared memory / memory mapped files. (#4886)

Public access to the backing buffer uses Span<T> instead of ArraySegment<T>.

Writing to the buffer now supports Span<T> in addition to T[].

To maintain backwards compatibility ENABLE_SPAN_T must be defined.
This commit is contained in:
Christopher Cifra
2018-08-23 12:05:31 -05:00
committed by Wouter van Oortmerssen
parent e1f48ad35a
commit d0321df8cf
10 changed files with 545 additions and 127 deletions

View File

@@ -10,4 +10,7 @@
<PackageLicenseUrl>https://github.com/google/flatbuffers/blob/master/LICENSE.txt</PackageLicenseUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Memory" Version="4.5.1" />
</ItemGroup>
</Project>