mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 02:23:05 +00:00
Added support for C# partial class generation when the csharp_partial attribute is used on a table/struct.
This commit is contained in:
@@ -6,7 +6,7 @@ namespace MyGame.Example
|
||||
using System;
|
||||
using FlatBuffers;
|
||||
|
||||
public sealed class TestSimpleTableWithEnum : Table {
|
||||
public partial class TestSimpleTableWithEnum : Table {
|
||||
public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return GetRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); }
|
||||
public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { return (obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
||||
public TestSimpleTableWithEnum __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
|
||||
|
||||
@@ -12,7 +12,7 @@ union Any { Monster, TestSimpleTableWithEnum } // TODO: add more elements
|
||||
|
||||
struct Test { a:short; b:byte; }
|
||||
|
||||
table TestSimpleTableWithEnum {
|
||||
table TestSimpleTableWithEnum (csharp_partial) {
|
||||
color: Color = Green;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user