Exemplo n.º 1
0
 public static Offset <optional_scalars.ScalarStuff> CreateScalarStuff(FlatBufferBuilder builder,
                                                                       sbyte just_i8      = 0,
                                                                       sbyte?maybe_i8     = null,
                                                                       sbyte default_i8   = 42,
                                                                       byte just_u8       = 0,
                                                                       byte?maybe_u8      = null,
                                                                       byte default_u8    = 42,
                                                                       short just_i16     = 0,
                                                                       short?maybe_i16    = null,
                                                                       short default_i16  = 42,
                                                                       ushort just_u16    = 0,
                                                                       ushort?maybe_u16   = null,
                                                                       ushort default_u16 = 42,
                                                                       int just_i32       = 0,
                                                                       int?maybe_i32      = null,
                                                                       int default_i32    = 42,
                                                                       uint just_u32      = 0,
                                                                       uint?maybe_u32     = null,
                                                                       uint default_u32   = 42,
                                                                       long just_i64      = 0,
                                                                       long?maybe_i64     = null,
                                                                       long default_i64   = 42,
                                                                       ulong just_u64     = 0,
                                                                       ulong?maybe_u64    = null,
                                                                       ulong default_u64  = 42,
                                                                       float just_f32     = 0.0f,
                                                                       float?maybe_f32    = null,
                                                                       float default_f32  = 42.0f,
                                                                       double just_f64    = 0.0,
                                                                       double?maybe_f64   = null,
                                                                       double default_f64 = 42.0,
                                                                       bool just_bool     = false,
                                                                       bool?maybe_bool    = null,
                                                                       bool default_bool  = true,
                                                                       optional_scalars.OptionalByte just_enum    = optional_scalars.OptionalByte.None,
                                                                       optional_scalars.OptionalByte?maybe_enum   = null,
                                                                       optional_scalars.OptionalByte default_enum = optional_scalars.OptionalByte.One)
 {
     builder.StartTable(36);
     ScalarStuff.AddDefaultF64(builder, default_f64);
     ScalarStuff.AddMaybeF64(builder, maybe_f64);
     ScalarStuff.AddJustF64(builder, just_f64);
     ScalarStuff.AddDefaultU64(builder, default_u64);
     ScalarStuff.AddMaybeU64(builder, maybe_u64);
     ScalarStuff.AddJustU64(builder, just_u64);
     ScalarStuff.AddDefaultI64(builder, default_i64);
     ScalarStuff.AddMaybeI64(builder, maybe_i64);
     ScalarStuff.AddJustI64(builder, just_i64);
     ScalarStuff.AddDefaultF32(builder, default_f32);
     ScalarStuff.AddMaybeF32(builder, maybe_f32);
     ScalarStuff.AddJustF32(builder, just_f32);
     ScalarStuff.AddDefaultU32(builder, default_u32);
     ScalarStuff.AddMaybeU32(builder, maybe_u32);
     ScalarStuff.AddJustU32(builder, just_u32);
     ScalarStuff.AddDefaultI32(builder, default_i32);
     ScalarStuff.AddMaybeI32(builder, maybe_i32);
     ScalarStuff.AddJustI32(builder, just_i32);
     ScalarStuff.AddDefaultU16(builder, default_u16);
     ScalarStuff.AddMaybeU16(builder, maybe_u16);
     ScalarStuff.AddJustU16(builder, just_u16);
     ScalarStuff.AddDefaultI16(builder, default_i16);
     ScalarStuff.AddMaybeI16(builder, maybe_i16);
     ScalarStuff.AddJustI16(builder, just_i16);
     ScalarStuff.AddDefaultEnum(builder, default_enum);
     ScalarStuff.AddMaybeEnum(builder, maybe_enum);
     ScalarStuff.AddJustEnum(builder, just_enum);
     ScalarStuff.AddDefaultBool(builder, default_bool);
     ScalarStuff.AddMaybeBool(builder, maybe_bool);
     ScalarStuff.AddJustBool(builder, just_bool);
     ScalarStuff.AddDefaultU8(builder, default_u8);
     ScalarStuff.AddMaybeU8(builder, maybe_u8);
     ScalarStuff.AddJustU8(builder, just_u8);
     ScalarStuff.AddDefaultI8(builder, default_i8);
     ScalarStuff.AddMaybeI8(builder, maybe_i8);
     ScalarStuff.AddJustI8(builder, just_i8);
     return(ScalarStuff.EndScalarStuff(builder));
 }