flatbuffers/net/FlatBuffers
Eric Erhardt 0cdacdfb35 Remove byte* property in ByteBufferAllocator (#5191)
* Remove byte* property in ByteBufferAllocator.

This allows consumers to read/write into native memory, but without
having to always pin the managed `byte[]` when working with managed
memory. This allows for users to not need to Dispose() ByteBuffers
when they are using the default ByteArrayAllocator class.

Instead, we use `Span<byte> GetSpan()` methods to get access to the
underlying memory buffer.

Fix #5181

* Add a set of benchmark tests.

* Add ReadOnly spans.

This allows consumers to use ReadOnlyMemory<byte> as the backing storage
for ByteBuffers, which is useful in read-only scenarios.

* Run tests using ENABLE_SPAN_T in appveyor.

* Fix FlatBuffers.Test.csproj to work on older MSBuild versions.

* Change the test script to test UNSAFE_BYTEBUFFER

* Address PR feedback.

Remove IDisposable from ByteBuffer.

* Respond to PR feedback.
2019-02-21 23:36:55 +01:00
..
Properties Revert "Convert net/FlatBuffers project to be compatible with netstandard (#4811)" 2018-10-29 17:21:30 -07:00
ByteBuffer.cs Remove byte* property in ByteBufferAllocator (#5191) 2019-02-21 23:36:55 +01:00
ByteBufferUtil.cs Java/C#/Python prefixed size support (#4445) 2018-03-12 11:30:46 -07:00
FlatBufferBuilder.cs 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) 2018-08-23 10:05:31 -07:00
FlatBufferConstants.cs Java/C#/Python prefixed size support (#4445) 2018-03-12 11:30:46 -07:00
FlatBuffers.Core.csproj Added .net core project (#5187) 2019-02-21 19:47:19 +01:00
FlatBuffers.csproj Revert "Convert net/FlatBuffers project to be compatible with netstandard (#4811)" 2018-10-29 17:21:30 -07:00
IFlatbufferObject.cs Allow access to underlying ByteBuffer 2016-09-12 09:35:08 +02:00
Offset.cs Switched C# accessors from classes to structs 2016-08-31 17:34:51 -07:00
Struct.cs Switched C# accessors from classes to structs 2016-08-31 17:34:51 -07:00
Table.cs 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) 2018-08-23 10:05:31 -07:00