1 // <auto-generated> 2 // automatically generated by the FlatBuffers compiler, do not modify 3 // </auto-generated> 4 5 namespace NamespaceA.NamespaceB 6 { 7 8 using global::System; 9 using global::System.Collections.Generic; 10 using global::FlatBuffers; 11 12 public struct ColorTestTable : IFlatbufferObject 13 { 14 private Table __p; 15 public ByteBuffer ByteBuffer { get { return __p.bb; } } ValidateVersionNamespaceA.NamespaceB.ColorTestTable16 public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_0(); } GetRootAsColorTestTableNamespaceA.NamespaceB.ColorTestTable17 public static ColorTestTable GetRootAsColorTestTable(ByteBuffer _bb) { return GetRootAsColorTestTable(_bb, new ColorTestTable()); } GetRootAsColorTestTableNamespaceA.NamespaceB.ColorTestTable18 public static ColorTestTable GetRootAsColorTestTable(ByteBuffer _bb, ColorTestTable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } __initNamespaceA.NamespaceB.ColorTestTable19 public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } __assignNamespaceA.NamespaceB.ColorTestTable20 public ColorTestTable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 21 22 public global::NamespaceB.Color Color { get { int o = __p.__offset(4); return o != 0 ? (global::NamespaceB.Color)__p.bb.GetSbyte(o + __p.bb_pos) : global::NamespaceB.Color.Blue; } } MutateColorNamespaceA.NamespaceB.ColorTestTable23 public bool MutateColor(global::NamespaceB.Color color) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutSbyte(o + __p.bb_pos, (sbyte)color); return true; } else { return false; } } 24 CreateColorTestTableNamespaceA.NamespaceB.ColorTestTable25 public static Offset<global::NamespaceA.NamespaceB.ColorTestTable> CreateColorTestTable(FlatBufferBuilder builder, 26 global::NamespaceB.Color color = global::NamespaceB.Color.Blue) { 27 builder.StartTable(1); 28 ColorTestTable.AddColor(builder, color); 29 return ColorTestTable.EndColorTestTable(builder); 30 } 31 StartColorTestTableNamespaceA.NamespaceB.ColorTestTable32 public static void StartColorTestTable(FlatBufferBuilder builder) { builder.StartTable(1); } AddColorNamespaceA.NamespaceB.ColorTestTable33 public static void AddColor(FlatBufferBuilder builder, global::NamespaceB.Color color) { builder.AddSbyte(0, (sbyte)color, 2); } EndColorTestTableNamespaceA.NamespaceB.ColorTestTable34 public static Offset<global::NamespaceA.NamespaceB.ColorTestTable> EndColorTestTable(FlatBufferBuilder builder) { 35 int o = builder.EndTable(); 36 return new Offset<global::NamespaceA.NamespaceB.ColorTestTable>(o); 37 } UnPackNamespaceA.NamespaceB.ColorTestTable38 public ColorTestTableT UnPack() { 39 var _o = new ColorTestTableT(); 40 this.UnPackTo(_o); 41 return _o; 42 } UnPackToNamespaceA.NamespaceB.ColorTestTable43 public void UnPackTo(ColorTestTableT _o) { 44 _o.Color = this.Color; 45 } PackNamespaceA.NamespaceB.ColorTestTable46 public static Offset<global::NamespaceA.NamespaceB.ColorTestTable> Pack(FlatBufferBuilder builder, ColorTestTableT _o) { 47 if (_o == null) return default(Offset<global::NamespaceA.NamespaceB.ColorTestTable>); 48 return CreateColorTestTable( 49 builder, 50 _o.Color); 51 } 52 } 53 54 public class ColorTestTableT 55 { 56 [Newtonsoft.Json.JsonProperty("color")] 57 public global::NamespaceB.Color Color { get; set; } 58 ColorTestTableT()59 public ColorTestTableT() { 60 this.Color = global::NamespaceB.Color.Blue; 61 } 62 } 63 64 65 } 66