diff options
author | Vladimir Glavnyy <31897320+vglavnyy@users.noreply.github.com> | 2019-06-18 00:16:21 +0700 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-06-17 19:16:21 +0200 |
commit | 0d2cebccfeffae9df998f3ac819bf17b7ec7a6d0 (patch) | |
tree | 02bde173585c860e9840a139454fad2e9c90c89e /tests/MyGame/Example/Referrable.cs | |
parent | a80db8538cf49953fbbf88ac380472655acc089e (diff) | |
download | flatbuffers-0d2cebccfeffae9df998f3ac819bf17b7ec7a6d0.tar.gz flatbuffers-0d2cebccfeffae9df998f3ac819bf17b7ec7a6d0.tar.bz2 flatbuffers-0d2cebccfeffae9df998f3ac819bf17b7ec7a6d0.zip |
Add FLATBUFFERS_COMPATIBILITY string (#5381)
* 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
Diffstat (limited to 'tests/MyGame/Example/Referrable.cs')
-rw-r--r-- | tests/MyGame/Example/Referrable.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/MyGame/Example/Referrable.cs b/tests/MyGame/Example/Referrable.cs index d3043532..5a79f911 100644 --- a/tests/MyGame/Example/Referrable.cs +++ b/tests/MyGame/Example/Referrable.cs @@ -12,9 +12,10 @@ public struct Referrable : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_11_1(); } public static Referrable GetRootAsReferrable(ByteBuffer _bb) { return GetRootAsReferrable(_bb, new Referrable()); } - public static Referrable GetRootAsReferrable(ByteBuffer _bb, Referrable obj) { FlatBufferConstants.FLATBUFFERS_1_11_1(); return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } - public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public static Referrable GetRootAsReferrable(ByteBuffer _bb, Referrable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public Referrable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public ulong Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } } |