summaryrefslogtreecommitdiff
path: root/tests/MyGame/Example/Referrable.cs
diff options
context:
space:
mode:
authorVladimir Glavnyy <31897320+vglavnyy@users.noreply.github.com>2019-06-18 00:16:21 +0700
committerWouter van Oortmerssen <aardappel@gmail.com>2019-06-17 19:16:21 +0200
commit0d2cebccfeffae9df998f3ac819bf17b7ec7a6d0 (patch)
tree02bde173585c860e9840a139454fad2e9c90c89e /tests/MyGame/Example/Referrable.cs
parenta80db8538cf49953fbbf88ac380472655acc089e (diff)
downloadflatbuffers-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.cs5
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; } }