1 // <auto-generated>
2 //  automatically generated by the FlatBuffers compiler, do not modify
3 // </auto-generated>
4 
5 namespace NamespaceA
6 {
7 
8 using global::System;
9 using global::System.Collections.Generic;
10 using global::FlatBuffers;
11 
12 public struct TableInFirstNS : IFlatbufferObject
13 {
14   private Table __p;
15   public ByteBuffer ByteBuffer { get { return __p.bb; } }
ValidateVersionNamespaceA.TableInFirstNS16   public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_12_0(); }
GetRootAsTableInFirstNSNamespaceA.TableInFirstNS17   public static TableInFirstNS GetRootAsTableInFirstNS(ByteBuffer _bb) { return GetRootAsTableInFirstNS(_bb, new TableInFirstNS()); }
GetRootAsTableInFirstNSNamespaceA.TableInFirstNS18   public static TableInFirstNS GetRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
__initNamespaceA.TableInFirstNS19   public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
__assignNamespaceA.TableInFirstNS20   public TableInFirstNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
21 
22   public NamespaceA.NamespaceB.TableInNestedNS? FooTable { get { int o = __p.__offset(4); return o != 0 ? (NamespaceA.NamespaceB.TableInNestedNS?)(new NamespaceA.NamespaceB.TableInNestedNS()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
23   public NamespaceA.NamespaceB.EnumInNestedNS FooEnum { get { int o = __p.__offset(6); return o != 0 ? (NamespaceA.NamespaceB.EnumInNestedNS)__p.bb.GetSbyte(o + __p.bb_pos) : NamespaceA.NamespaceB.EnumInNestedNS.A; } }
MutateFooEnumNamespaceA.TableInFirstNS24   public bool MutateFooEnum(NamespaceA.NamespaceB.EnumInNestedNS foo_enum) { int o = __p.__offset(6); if (o != 0) { __p.bb.PutSbyte(o + __p.bb_pos, (sbyte)foo_enum); return true; } else { return false; } }
25   public NamespaceA.NamespaceB.StructInNestedNS? FooStruct { get { int o = __p.__offset(8); return o != 0 ? (NamespaceA.NamespaceB.StructInNestedNS?)(new NamespaceA.NamespaceB.StructInNestedNS()).__assign(o + __p.bb_pos, __p.bb) : null; } }
26 
StartTableInFirstNSNamespaceA.TableInFirstNS27   public static void StartTableInFirstNS(FlatBufferBuilder builder) { builder.StartTable(3); }
AddFooTableNamespaceA.TableInFirstNS28   public static void AddFooTable(FlatBufferBuilder builder, Offset<NamespaceA.NamespaceB.TableInNestedNS> fooTableOffset) { builder.AddOffset(0, fooTableOffset.Value, 0); }
AddFooEnumNamespaceA.TableInFirstNS29   public static void AddFooEnum(FlatBufferBuilder builder, NamespaceA.NamespaceB.EnumInNestedNS fooEnum) { builder.AddSbyte(1, (sbyte)fooEnum, 0); }
AddFooStructNamespaceA.TableInFirstNS30   public static void AddFooStruct(FlatBufferBuilder builder, Offset<NamespaceA.NamespaceB.StructInNestedNS> fooStructOffset) { builder.AddStruct(2, fooStructOffset.Value, 0); }
EndTableInFirstNSNamespaceA.TableInFirstNS31   public static Offset<NamespaceA.TableInFirstNS> EndTableInFirstNS(FlatBufferBuilder builder) {
32     int o = builder.EndTable();
33     return new Offset<NamespaceA.TableInFirstNS>(o);
34   }
UnPackNamespaceA.TableInFirstNS35   public TableInFirstNST UnPack() {
36     var _o = new TableInFirstNST();
37     this.UnPackTo(_o);
38     return _o;
39   }
UnPackToNamespaceA.TableInFirstNS40   public void UnPackTo(TableInFirstNST _o) {
41     _o.FooTable = this.FooTable.HasValue ? this.FooTable.Value.UnPack() : null;
42     _o.FooEnum = this.FooEnum;
43     _o.FooStruct = this.FooStruct.HasValue ? this.FooStruct.Value.UnPack() : null;
44   }
PackNamespaceA.TableInFirstNS45   public static Offset<NamespaceA.TableInFirstNS> Pack(FlatBufferBuilder builder, TableInFirstNST _o) {
46     if (_o == null) return default(Offset<NamespaceA.TableInFirstNS>);
47     var _foo_table = _o.FooTable == null ? default(Offset<NamespaceA.NamespaceB.TableInNestedNS>) : NamespaceA.NamespaceB.TableInNestedNS.Pack(builder, _o.FooTable);
48     StartTableInFirstNS(builder);
49     AddFooTable(builder, _foo_table);
50     AddFooEnum(builder, _o.FooEnum);
51     AddFooStruct(builder, NamespaceA.NamespaceB.StructInNestedNS.Pack(builder, _o.FooStruct));
52     return EndTableInFirstNS(builder);
53   }
54 };
55 
56 public class TableInFirstNST
57 {
58   [Newtonsoft.Json.JsonProperty("foo_table")]
59   public NamespaceA.NamespaceB.TableInNestedNST FooTable { get; set; }
60   [Newtonsoft.Json.JsonProperty("foo_enum")]
61   public NamespaceA.NamespaceB.EnumInNestedNS FooEnum { get; set; }
62   [Newtonsoft.Json.JsonProperty("foo_struct")]
63   public NamespaceA.NamespaceB.StructInNestedNST FooStruct { get; set; }
64 
TableInFirstNST()65   public TableInFirstNST() {
66     this.FooTable = null;
67     this.FooEnum = NamespaceA.NamespaceB.EnumInNestedNS.A;
68     this.FooStruct = new NamespaceA.NamespaceB.StructInNestedNST();
69   }
70 }
71 
72 
73 }
74