Merge pull request #4020 from albertofem/feature/allow_public_accessor_net

Allow access to underlying ByteBuffer in C#
This commit is contained in:
Wouter van Oortmerssen
2016-09-12 10:35:16 -07:00
committed by GitHub
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";