Ejemplo n.º 1
0
 public static void Serialize(DependentType instance, global::Improbable.Worker.CInterop.SchemaObject obj)
 {
     {
         global::Improbable.TestSchema.ExhaustiveRepeatedData.Serialization.Serialize(instance.A, obj.AddObject(1));
     }
     {
         obj.AddEnum(2, (uint)instance.B);
     }
     {
         if (instance.C.HasValue)
         {
             obj.AddEnum(3, (uint)instance.C.Value);
         }
     }
     {
         foreach (var value in instance.D)
         {
             global::Improbable.TestSchema.SomeType.Serialization.Serialize(value, obj.AddObject(4));
         }
     }
     {
         foreach (var keyValuePair in instance.E)
         {
             var mapObj = obj.AddObject(5);
             mapObj.AddEnum(1, (uint)keyValuePair.Key);
             global::Improbable.TestSchema.SomeType.Serialization.Serialize(keyValuePair.Value, mapObj.AddObject(2));
         }
     }
 }
            public static void SerializeSnapshot(global::Improbable.DependentSchema.DependentComponent.Snapshot snapshot, global::Improbable.Worker.CInterop.SchemaObject obj)
            {
                global::Improbable.TestSchema.ExhaustiveRepeatedData.Serialization.Serialize(snapshot.A, obj.AddObject(1));

                obj.AddEnum(2, (uint)snapshot.B);

                if (snapshot.C.HasValue)
                {
                    obj.AddEnum(3, (uint)snapshot.C.Value);
                }


                foreach (var value in snapshot.D)
                {
                    global::Improbable.TestSchema.SomeType.Serialization.Serialize(value, obj.AddObject(4));
                }


                foreach (var keyValuePair in snapshot.E)
                {
                    var mapObj = obj.AddObject(5);
                    mapObj.AddEnum(1, (uint)keyValuePair.Key);
                    global::Improbable.TestSchema.SomeType.Serialization.Serialize(keyValuePair.Value, mapObj.AddObject(2));
                }
            }
Ejemplo n.º 3
0
 public static void SerializeComponent(global::Improbable.DependentSchema.DependentComponent.Component component, global::Improbable.Worker.CInterop.SchemaObject obj, global::Unity.Entities.World world)
 {
     {
         global::Improbable.TestSchema.ExhaustiveRepeatedData.Serialization.Serialize(component.A, obj.AddObject(1));
     }
     {
         obj.AddEnum(2, (uint)component.B);
     }
     {
         if (component.C.HasValue)
         {
             obj.AddEnum(3, (uint)component.C.Value);
         }
     }
     {
         foreach (var value in component.D)
         {
             global::Improbable.TestSchema.SomeType.Serialization.Serialize(value, obj.AddObject(4));
         }
     }
     {
         foreach (var keyValuePair in component.E)
         {
             var mapObj = obj.AddObject(5);
             mapObj.AddEnum(1, (uint)keyValuePair.Key);
             global::Improbable.TestSchema.SomeType.Serialization.Serialize(keyValuePair.Value, mapObj.AddObject(2));
         }
     }
 }
Ejemplo n.º 4
0
 public static void Serialize(NestedTypeName instance, global::Improbable.Worker.CInterop.SchemaObject obj)
 {
     {
         global::Improbable.Gdk.Tests.TypeName.Other.NestedTypeName.Other0.Serialization.Serialize(instance.OtherZero, obj.AddObject(1));
     }
     {
         obj.AddEnum(2, (uint)instance.EnumField);
     }
 }
 public static void Serialize(ExhaustiveSingularData instance, global::Improbable.Worker.CInterop.SchemaObject obj)
 {
     {
         obj.AddBool(1, instance.Field1);
     }
     {
         obj.AddFloat(2, instance.Field2);
     }
     {
         obj.AddBytes(3, instance.Field3);
     }
     {
         obj.AddInt32(4, instance.Field4);
     }
     {
         obj.AddInt64(5, instance.Field5);
     }
     {
         obj.AddDouble(6, instance.Field6);
     }
     {
         obj.AddString(7, instance.Field7);
     }
     {
         obj.AddUint32(8, instance.Field8);
     }
     {
         obj.AddUint64(9, instance.Field9);
     }
     {
         obj.AddSint32(10, instance.Field10);
     }
     {
         obj.AddSint64(11, instance.Field11);
     }
     {
         obj.AddFixed32(12, instance.Field12);
     }
     {
         obj.AddFixed64(13, instance.Field13);
     }
     {
         obj.AddSfixed32(14, instance.Field14);
     }
     {
         obj.AddSfixed64(15, instance.Field15);
     }
     {
         obj.AddEntityId(16, instance.Field16);
     }
     {
         global::Improbable.Gdk.Tests.SomeType.Serialization.Serialize(instance.Field17, obj.AddObject(17));
     }
     {
         obj.AddEnum(18, (uint)instance.Field18);
     }
 }
Ejemplo n.º 6
0
 public static void Serialize(Connection instance, global::Improbable.Worker.CInterop.SchemaObject obj)
 {
     {
         obj.AddEnum(1, (uint)instance.Status);
     }
     {
         obj.AddUint32(2, instance.DataLatencyMs);
     }
     {
         obj.AddUint64(3, instance.ConnectedSinceUtc);
     }
 }
Ejemplo n.º 7
0
                    public static void Serialize(NestedTypeSameName instance, global::Improbable.Worker.CInterop.SchemaObject obj)
                    {
                        {
                            obj.AddInt32(1, instance.NestedField);
                        }

                        {
                            global::Improbable.TestSchema.NestedTypeSameName.Other.NestedTypeSameName.Other0.NestedTypeSameName.Serialization.Serialize(instance.Other0Field, obj.AddObject(2));
                        }

                        {
                            obj.AddEnum(3, (uint)instance.Other1Field);
                        }
                    }
 public static void Serialize(ExhaustiveRepeatedData instance, global::Improbable.Worker.CInterop.SchemaObject obj)
 {
     {
         foreach (var value in instance.Field1)
         {
             obj.AddBool(1, value);
         }
     }
     {
         foreach (var value in instance.Field2)
         {
             obj.AddFloat(2, value);
         }
     }
     {
         foreach (var value in instance.Field3)
         {
             obj.AddBytes(3, value);
         }
     }
     {
         foreach (var value in instance.Field4)
         {
             obj.AddInt32(4, value);
         }
     }
     {
         foreach (var value in instance.Field5)
         {
             obj.AddInt64(5, value);
         }
     }
     {
         foreach (var value in instance.Field6)
         {
             obj.AddDouble(6, value);
         }
     }
     {
         foreach (var value in instance.Field7)
         {
             obj.AddString(7, value);
         }
     }
     {
         foreach (var value in instance.Field8)
         {
             obj.AddUint32(8, value);
         }
     }
     {
         foreach (var value in instance.Field9)
         {
             obj.AddUint64(9, value);
         }
     }
     {
         foreach (var value in instance.Field10)
         {
             obj.AddSint32(10, value);
         }
     }
     {
         foreach (var value in instance.Field11)
         {
             obj.AddSint64(11, value);
         }
     }
     {
         foreach (var value in instance.Field12)
         {
             obj.AddFixed32(12, value);
         }
     }
     {
         foreach (var value in instance.Field13)
         {
             obj.AddFixed64(13, value);
         }
     }
     {
         foreach (var value in instance.Field14)
         {
             obj.AddSfixed32(14, value);
         }
     }
     {
         foreach (var value in instance.Field15)
         {
             obj.AddSfixed64(15, value);
         }
     }
     {
         foreach (var value in instance.Field16)
         {
             obj.AddEntityId(16, value);
         }
     }
     {
         foreach (var value in instance.Field17)
         {
             global::Improbable.TestSchema.SomeType.Serialization.Serialize(value, obj.AddObject(17));
         }
     }
     {
         foreach (var value in instance.Field18)
         {
             obj.AddEnum(18, (uint)value);
         }
     }
 }
Ejemplo n.º 9
0
            public static void Serialize(ExhaustiveOptionalData instance, global::Improbable.Worker.CInterop.SchemaObject obj)
            {
                {
                    if (instance.Field1.HasValue)
                    {
                        obj.AddBool(1, instance.Field1.Value);
                    }
                }

                {
                    if (instance.Field2.HasValue)
                    {
                        obj.AddFloat(2, instance.Field2.Value);
                    }
                }

                {
                    if (instance.Field3.HasValue)
                    {
                        obj.AddBytes(3, instance.Field3.Value);
                    }
                }

                {
                    if (instance.Field4.HasValue)
                    {
                        obj.AddInt32(4, instance.Field4.Value);
                    }
                }

                {
                    if (instance.Field5.HasValue)
                    {
                        obj.AddInt64(5, instance.Field5.Value);
                    }
                }

                {
                    if (instance.Field6.HasValue)
                    {
                        obj.AddDouble(6, instance.Field6.Value);
                    }
                }

                {
                    if (instance.Field7.HasValue)
                    {
                        obj.AddString(7, instance.Field7.Value);
                    }
                }

                {
                    if (instance.Field8.HasValue)
                    {
                        obj.AddUint32(8, instance.Field8.Value);
                    }
                }

                {
                    if (instance.Field9.HasValue)
                    {
                        obj.AddUint64(9, instance.Field9.Value);
                    }
                }

                {
                    if (instance.Field10.HasValue)
                    {
                        obj.AddSint32(10, instance.Field10.Value);
                    }
                }

                {
                    if (instance.Field11.HasValue)
                    {
                        obj.AddSint64(11, instance.Field11.Value);
                    }
                }

                {
                    if (instance.Field12.HasValue)
                    {
                        obj.AddFixed32(12, instance.Field12.Value);
                    }
                }

                {
                    if (instance.Field13.HasValue)
                    {
                        obj.AddFixed64(13, instance.Field13.Value);
                    }
                }

                {
                    if (instance.Field14.HasValue)
                    {
                        obj.AddSfixed32(14, instance.Field14.Value);
                    }
                }

                {
                    if (instance.Field15.HasValue)
                    {
                        obj.AddSfixed64(15, instance.Field15.Value);
                    }
                }

                {
                    if (instance.Field16.HasValue)
                    {
                        obj.AddEntityId(16, instance.Field16.Value);
                    }
                }

                {
                    if (instance.Field17.HasValue)
                    {
                        global::Improbable.TestSchema.SomeType.Serialization.Serialize(instance.Field17.Value, obj.AddObject(17));
                    }
                }

                {
                    if (instance.Field18.HasValue)
                    {
                        obj.AddEnum(18, (uint)instance.Field18.Value);
                    }
                }
            }
Ejemplo n.º 10
0
 public static void Serialize(Other1 instance, global::Improbable.Worker.CInterop.SchemaObject obj)
 {
     {
         obj.AddEnum(1, (uint)instance.Field);
     }
 }