Files
flatbuffers-bigfoot/tests/MyGame/Example/Test.cs
Spencer Bench ccfa317486 C#: Fixed possible conflicts between usings and user-supplied namespace (#4247)
* C#: Fixed possible conflicts between usings and user-supplied namespace

C#: Added the global qualifier to using directives to prevent possible conflicts with the user-supplied namespace. Also prevents unintentional type hiding. Resolves issue #4242.

* Updated C# generated code files
2017-03-29 11:09:25 -07:00

32 lines
950 B
C#

// automatically generated by the FlatBuffers compiler, do not modify
namespace MyGame.Example
{
using global::System;
using global::FlatBuffers;
public struct Test : IFlatbufferObject
{
private Struct __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
public Test __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public short A { get { return __p.bb.GetShort(__p.bb_pos + 0); } }
public void MutateA(short a) { __p.bb.PutShort(__p.bb_pos + 0, a); }
public sbyte B { get { return __p.bb.GetSbyte(__p.bb_pos + 2); } }
public void MutateB(sbyte b) { __p.bb.PutSbyte(__p.bb_pos + 2, b); }
public static Offset<Test> CreateTest(FlatBufferBuilder builder, short A, sbyte B) {
builder.Prep(2, 4);
builder.Pad(1);
builder.PutSbyte(B);
builder.PutShort(A);
return new Offset<Test>(builder.Offset);
}
};
}