Example #1
0
 public static void AddUsePostDisplacements(FlatBufferBuilder builder, bool usePostDisplacements)
 {
     builder.AddBool(3, usePostDisplacements, false);
 }
Example #2
0
 public static VectorOffset CreateSectorsVector(FlatBufferBuilder builder, bool[] data)
 {
     builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddBool(data[i]); return builder.EndVector();
 }
 public static void AddDone(FlatBufferBuilder builder, bool done)
 {
     builder.AddBool(3, done, false);
 }
Example #4
0
 public static void AddUseDq(FlatBufferBuilder builder, bool useDq)
 {
     builder.AddBool(1, useDq, false);
 }
Example #5
0
 public static void AddTestbool(FlatBufferBuilder builder, bool testbool)
 {
     builder.AddBool(15, testbool, false);
 }
        /// <summary>
        /// Serializes a value as inline
        /// </summary>
        private int SerializeInlineValue(object obj, TypeModel typeModel)
        {
            switch (typeModel.BaseType)
            {
            case BaseType.Bool:
            {
                _builder.AddBool((bool)obj);
                break;
            }

            case BaseType.Char:
            {
                _builder.AddSbyte((sbyte)obj);
                break;
            }

            case BaseType.UChar:
            {
                _builder.AddByte((byte)obj);
                break;
            }

            case BaseType.Short:
            {
                _builder.AddShort((short)obj);
                break;
            }

            case BaseType.UShort:
            {
                _builder.AddUshort((ushort)obj);
                break;
            }

            case BaseType.Int:
            {
                _builder.AddInt((int)obj);
                break;
            }

            case BaseType.UInt:
            {
                _builder.AddUint((uint)obj);
                break;
            }

            case BaseType.Long:
            {
                _builder.AddLong((long)obj);
                break;
            }

            case BaseType.ULong:
            {
                _builder.AddUlong((ulong)obj);
                break;
            }

            case BaseType.Float:
            {
                _builder.AddFloat((float)obj);
                break;
            }

            case BaseType.Double:
            {
                _builder.AddDouble((double)obj);
                break;
            }

            case BaseType.Struct:
            {
                return(SerializeStruct(obj, typeModel));
            }

            default:
            {
                throw new InvalidOperationException();
            }
            }
            return(_builder.Offset);
        }
Example #7
0
 public static void AddPaused(FlatBufferBuilder builder, bool paused)
 {
     builder.AddBool(3, paused, false);
 }
 public static void AddValue(FlatBufferBuilder builder, bool value)
 {
     builder.AddBool(1, value, false);
 }
 public static void AddEnabled(FlatBufferBuilder builder, bool enabled)
 {
     builder.AddBool(4, enabled, false);
 }
Example #10
0
 public static void AddIsTracked(FlatBufferBuilder builder, bool isTracked)
 {
     builder.AddBool(1, isTracked, false);
 }
Example #11
0
 public static void AddIsRestricted(FlatBufferBuilder builder, bool isRestricted)
 {
     builder.AddBool(2, isRestricted, false);
 }