* [C#] Fix and improve project files
* "net35" target included for Unity 5
* "net46" target included for Unity 2017
* "netstandard2.0" target included for Unity 2018 and general use
* "netstandard2.1" target included for Span<T> support
Included project properties for defining UNSAFE_BYTEBUFFER, BYTEBUFFER_NO_BOUNDS_CHECK, and ENABLE_SPAN_T conditional compilation symbols.
* Add documentation on building for C#
* ENABLE_SPAN_T doesn't require UNSAFE_BYTEBUFFER.
Change to ENABLE_SPAN_T that doesn't require UNSAFE_BYTEBUFFER.
* Selectable framework.
Changed target framework to allow selection of 2.0 or 2.1 (or higher)
* Added target framework version check.
* Add core test project.
* Added run on .Net Core.
* [C#] Fix and improve project files
* "net35" target included for Unity 5
* "net46" target included for Unity 2017
* "netstandard2.0" target included for Unity 2018 and general use
* "netstandard2.1" target included for Span<T> support
Included project properties for defining UNSAFE_BYTEBUFFER, BYTEBUFFER_NO_BOUNDS_CHECK, and ENABLE_SPAN_T conditional compiler constants.
* Add documentation on building for C#
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case.
* Thread safe reads of Double and Floats from ByteBuffer
* Add element size parameter to __vector_as_arraysegment
Add element size parameter to __vector_as_arraysegment fixing issue where VectorAsBytes returns incorrect size span for multibyte element types.
* Update codegen
Update codegen and Table to return typed span.
* update test files
update test files
* Add FLATBUFFERS_COMPATIBILITY string
- Add a new __reset method NET/JAVA which hides internal state
* Resolve PR notes
* Use operator new() to __init of Struct and Table
* Restrict visibility of C# Table/Struct to internal level
This is done on purpose, to avoid API version mismatches that
can cause bad decoding results, see:
https://github.com/google/flatbuffers/issues/5368
Change-Id: I2c857438377e080caad0e2d8bcc758c9b19bd6ec
* 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.
* 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.
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.
* Remove usage of expression bodied method so that ByteBuffer can be compiled with older version of C#.
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.
* Added preprocessor define for C++ if Template Aliases are supported by the compiler
* Revert "Revert "Performance Increase of Vector of Structures using .NET BlockCopy (#4830)""
This reverts commit 1f5eae5d6a.
* Put<T> method was inside #if UNSAFE_BYTEBUFFER which caused compilation failure when building in unsafe mode
* Revert "Added preprocessor define for C++ if Template Aliases are supported by the compiler"
This reverts commit a75af73521.
* Added Get<vector_name>Array() method for accessing vectors of structures in C# using Buffer.Blockcopy().
* Added Get<vector_name>Array() method for accessing vectors of structures in C# using Buffer.Blockcopy().
Added Create<Name>VectorBlock() method to add a typed array using Buffer.BlockCopy() to speed up creation of vector of arrays
New Lua files for namespace test
* fixed c++ style issue
* initial changes to support size prefixed buffers in Java
* add slice equivalent to CSharp ByteBuffer
* resolve TODO for slicing in CSharp code generation
* add newly generated Java and CSharp test sources
* fix typo in comment
* add FinishSizePrefixed methods to CSharp FlatBufferBuilder as well
* add option to allow writing the prefix as well
* generate size-prefixed monster binary as well
* extend JavaTest to test the size prefixed binary as well
* use constants for size prefix length
* fuse common code for getRootAs and getSizePrefixedRootAs
* pulled file identifier out of if
* add FinishSizePrefixed, GetSizePrefixedRootAs support for Python
* Revert "extend JavaTest to test the size prefixed binary as well"
This reverts commit 68be4420dd.
* Revert "generate size-prefixed monster binary as well"
This reverts commit 2939516fdf.
* fix ByteBuffer.cs Slice() method; add proper CSharp and Java tests
* fix unused parameter
* increment version number
* pulled out generated methods into separate utility class
* pulled out generated methods into separate utility class for Python
* fix indentation
* remove unnecessary comment
* fix newline and copyright
* add ByteBufferUtil to csproj compilation
* hide ByteBuffer's internal data; track offset into parent's array
* test unsafe versions as well; compile and run in debug mode
* clarify help text for size prefix
* move ByteBuffer slicing behavior to subclass
* fix protection levels
* add size prefix support for text generation
* add ByteBufferSlice to csproj compilation
* revert size prefix handling for nested buffers
* use duplicate instead of slice for removing size prefix
* remove slice subclass and use duplicate for removing size prefix
* remove slice specific tests
* remove superfluous command line option
This is something the format supports, but none of the builders
were doing. Can save 10-20% on FlatBuffer binary size!
Also fixed the Go tests.
Change-Id: I616c56ce9bbcfcaee23aa24f0532fcb60b6a8c75
Tested: on Linux.
This was a frequent source of confusion, since in all implementations
the data doesn't start at offset 0 in the buffer.
Change-Id: I045966e65928e9acd9def84e215914ecb5510653
Adding an API reference for the supported languages.
General docs cleanup, including a new `tutorial` section that
supports all of the supported languages.
Added samples for each supported language to mirror the new
tutorial page.
Cleaned up all the links by making them `@ref` style links,
instead of referencing the names of the generated `.html` files.
Removed all generated files that were unnecessarily committed.
Also fixed the C# tests (two were failing due to a missing file).
Bug: b/25801305
Tested: Tested all samples on Ubuntu, Mac, and Android. Docs were
generated using doxygen and viewed on Chrome.
Change-Id: I2acaba6e332a15ae2deff5f26a4a25da7bd2c954