Allow access to underlying ByteBuffer

This commit is contained in:
Alberto Fernández
2016-09-09 15:25:09 +02:00
parent 8e3fa336eb
commit 02dfa64a89
15 changed files with 21 additions and 3 deletions

View File

@@ -804,6 +804,11 @@ void GenStruct(StructDef &struct_def, std::string *code_ptr) {
code += " private ";
code += struct_def.fixed ? "Struct" : "Table";
code += " __p;\n";
if (lang_.language == IDLOptions::kCSharp) {
code += " public ByteBuffer ByteBuffer { get { return __p.bb; } }\n";
}
} else {
code += lang_.inheritance_marker;
code += struct_def.fixed ? "Struct" : "Table";