Fix to #360 - Updated the general generator (Java/C#) to emit fully qualified names where the referenced object isn't directly in this namespace. Added test fbs files to verify compilation.

This commit is contained in:
Oli Wilkinson
2015-11-29 15:31:55 -05:00
parent fe2f8d32aa
commit c9ad6d5496
25 changed files with 922 additions and 93 deletions

View File

@@ -0,0 +1,25 @@
// automatically generated, do not modify
namespace NamespaceA.NamespaceB
{
using FlatBuffers;
public sealed class StructInNestedNS : Struct {
public StructInNestedNS __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
public int A { get { return bb.GetInt(bb_pos + 0); } }
public void MutateA(int a) { bb.PutInt(bb_pos + 0, a); }
public int B { get { return bb.GetInt(bb_pos + 4); } }
public void MutateB(int b) { bb.PutInt(bb_pos + 4, b); }
public static Offset<StructInNestedNS> CreateStructInNestedNS(FlatBufferBuilder builder, int A, int B) {
builder.Prep(4, 8);
builder.PutInt(B);
builder.PutInt(A);
return new Offset<StructInNestedNS>(builder.Offset);
}
};
}