...

Text file src/github.com/google/flatbuffers/goldens/csharp/Galaxy.cs

Documentation: github.com/google/flatbuffers/goldens/csharp

     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 Galaxy : IFlatbufferObject
    10{
    11  private Table __p;
    12  public ByteBuffer ByteBuffer { get { return __p.bb; } }
    13  public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_5_26(); }
    14  public static Galaxy GetRootAsGalaxy(ByteBuffer _bb) { return GetRootAsGalaxy(_bb, new Galaxy()); }
    15  public static Galaxy GetRootAsGalaxy(ByteBuffer _bb, Galaxy obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
    16  public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
    17  public Galaxy __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
    18
    19  public long NumStars { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
    20
    21  public static Offset<Galaxy> CreateGalaxy(FlatBufferBuilder builder,
    22      long num_stars = 0) {
    23    builder.StartTable(1);
    24    Galaxy.AddNumStars(builder, num_stars);
    25    return Galaxy.EndGalaxy(builder);
    26  }
    27
    28  public static void StartGalaxy(FlatBufferBuilder builder) { builder.StartTable(1); }
    29  public static void AddNumStars(FlatBufferBuilder builder, long numStars) { builder.AddLong(0, numStars, 0); }
    30  public static Offset<Galaxy> EndGalaxy(FlatBufferBuilder builder) {
    31    int o = builder.EndTable();
    32    return new Offset<Galaxy>(o);
    33  }
    34}
    35
    36
    37static public class GalaxyVerify
    38{
    39  static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
    40  {
    41    return verifier.VerifyTableStart(tablePos)
    42      && verifier.VerifyField(tablePos, 4 /*NumStars*/, 8 /*long*/, 8, false)
    43      && verifier.VerifyTableEnd(tablePos);
    44  }
    45}

View as plain text