...

Text file src/github.com/google/flatbuffers/tests/union_vector/BookReader.cs

Documentation: github.com/google/flatbuffers/tests/union_vector

     1// <auto-generated>
     2//  automatically generated by the FlatBuffers compiler, do not modify
     3// </auto-generated>
     4
     5using global::System;
     6using global::System.Collections.Generic;
     7using global::Google.FlatBuffers;
     8
     9public struct BookReader : IFlatbufferObject
    10{
    11  private Struct __p;
    12  public ByteBuffer ByteBuffer { get { return __p.bb; } }
    13  public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
    14  public BookReader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
    15
    16  public int BooksRead { get { return __p.bb.GetInt(__p.bb_pos + 0); } }
    17  public void MutateBooksRead(int books_read) { __p.bb.PutInt(__p.bb_pos + 0, books_read); }
    18
    19  public static Offset<BookReader> CreateBookReader(FlatBufferBuilder builder, int BooksRead) {
    20    builder.Prep(4, 4);
    21    builder.PutInt(BooksRead);
    22    return new Offset<BookReader>(builder.Offset);
    23  }
    24  public BookReaderT UnPack() {
    25    var _o = new BookReaderT();
    26    this.UnPackTo(_o);
    27    return _o;
    28  }
    29  public void UnPackTo(BookReaderT _o) {
    30    _o.BooksRead = this.BooksRead;
    31  }
    32  public static Offset<BookReader> Pack(FlatBufferBuilder builder, BookReaderT _o) {
    33    if (_o == null) return default(Offset<BookReader>);
    34    return CreateBookReader(
    35      builder,
    36      _o.BooksRead);
    37  }
    38}
    39
    40public class BookReaderT
    41{
    42  [Newtonsoft.Json.JsonProperty("books_read")]
    43  public int BooksRead { get; set; }
    44
    45  public BookReaderT() {
    46    this.BooksRead = 0;
    47  }
    48}
    49

View as plain text