mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
Merge pull request #4020 from albertofem/feature/allow_public_accessor_net
Allow access to underlying ByteBuffer in C#
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user