示例#1
0
            public static SecondCommandResponse Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new SecondCommandResponse();

                instance.Response = obj.GetDouble(1);
                return(instance);
            }
示例#2
0
            public static SecondCommandRequest Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new SecondCommandRequest();

                instance.Field = obj.GetInt64(1);
                return(instance);
            }
示例#3
0
                        public static Other0 Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
                        {
                            var instance = new Other0();

                            instance.Foo = obj.GetInt32(1);
                            return(instance);
                        }
示例#4
0
            public static FirstCommandResponse Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new FirstCommandResponse();

                instance.Response = obj.GetString(1);
                return(instance);
            }
示例#5
0
                public static Other Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
                {
                    var instance = new Other();

                    instance.SameName = global::Generated.Improbable.Gdk.Tests.TypeName.Other.NestedTypeName.Serialization.Deserialize(obj.GetObject(1));
                    return(instance);
                }
示例#6
0
            public static FirstEventPayload Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new FirstEventPayload();

                instance.Field1 = obj.GetBool(1);
                instance.Field2 = obj.GetString(2);
                return(instance);
            }
示例#7
0
            public static SecondEventPayload Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new SecondEventPayload();

                instance.Field1 = obj.GetFloat(1);
                instance.Field2 = obj.GetDouble(2);
                return(instance);
            }
示例#8
0
 public static void Serialize(SecondEventPayload instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     obj.AddFloat(1, instance.Field1);
     foreach (var value in instance.Field2)
     {
         obj.AddDouble(2, value);
     }
 }
示例#9
0
                    public static NestedTypeName Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
                    {
                        var instance = new NestedTypeName();

                        instance.OtherZero = global::Generated.Improbable.Gdk.Tests.TypeName.Other.NestedTypeName.Other0.Serialization.Deserialize(obj.GetObject(1));
                        instance.EnumField = (global::Generated.Improbable.Gdk.Tests.TypeName.Other.NestedTypeName.NestedEnum)obj.GetEnum(2);
                        return(instance);
                    }
 public static void Serialize(FirstEventPayload instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     {
         obj.AddBool(1, instance.Field1);
     }
     {
         obj.AddString(2, instance.Field2);
     }
 }
            public static Improbable.Gdk.Tests.NestedComponent.Component Deserialize(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new Improbable.Gdk.Tests.NestedComponent.Component();

                {
                    component.NestedType = global::Improbable.Gdk.Tests.TypeName.Serialization.Deserialize(obj.GetObject(1));
                }
                return(component);
            }
示例#12
0
 public static void Serialize(NestedTypeName instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     {
         global::Generated.Improbable.Gdk.Tests.TypeName.Other.NestedTypeName.Other0.Serialization.Serialize(instance.OtherZero, obj.AddObject(1));
     }
     {
         obj.AddEnum(2, (uint)instance.EnumField);
     }
 }
示例#13
0
            public static TypeName Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new TypeName();

                {
                    instance.OtherType = global::Generated.Improbable.Gdk.Tests.TypeName.Other.Serialization.Deserialize(obj.GetObject(1));
                }
                return(instance);
            }
            public static FirstCommandRequest Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new FirstCommandRequest();

                {
                    instance.Field = obj.GetInt32(1);
                }
                return(instance);
            }
示例#15
0
            public static SecondEventPayload Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new SecondEventPayload();

                instance.Field1 = obj.GetFloat(1);
                var field2 = instance.Field2 = new global::System.Collections.Generic.List <double>();

                for (var i = 0; i < obj.GetDoubleCount(2); i++)
                {
                    field2.Add(obj.IndexDouble(2, (uint)i));
                }

                return(instance);
            }
示例#16
0
            public static Empty Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new Empty();

                return(instance);
            }
示例#17
0
 public static void Serialize(Empty instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
 }
示例#18
0
            public static RandomDataType Deserialize(global::Improbable.Worker.Core.SchemaObject obj)
            {
                var instance = new RandomDataType();

                return(instance);
            }
示例#19
0
 public static void Serialize(RandomDataType instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
 }
            public static SpatialOSComponentWithNoFieldsWithEvents.Update GetAndApplyUpdate(global::Improbable.Worker.Core.SchemaObject obj, ref SpatialOSComponentWithNoFieldsWithEvents component)
            {
                var update = new SpatialOSComponentWithNoFieldsWithEvents.Update();

                return(update);
            }
            public static SpatialOSComponentWithNoFieldsWithEvents Deserialize(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new SpatialOSComponentWithNoFieldsWithEvents();

                return(component);
            }
            public static Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.Snapshot DeserializeSnapshot(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.Snapshot();

                {
                    component.BoolField = obj.GetBool(1);
                }

                {
                    component.IntField = obj.GetInt32(2);
                }

                {
                    component.LongField = obj.GetInt64(3);
                }

                {
                    component.FloatField = obj.GetFloat(4);
                }

                {
                    component.DoubleField = obj.GetDouble(5);
                }

                {
                    component.StringField = obj.GetString(6);
                }

                {
                    if (obj.GetInt32Count(7) == 1)
                    {
                        component.OptionalField = new int?(obj.GetInt32(7));
                    }
                }

                {
                    component.ListField = new global::System.Collections.Generic.List <int>();
                    var list       = component.ListField;
                    var listLength = obj.GetInt32Count(8);
                    for (var i = 0; i < listLength; i++)
                    {
                        list.Add(obj.IndexInt32(8, (uint)i));
                    }
                }

                {
                    component.MapField = new global::System.Collections.Generic.Dictionary <int, string>();
                    var map     = component.MapField;
                    var mapSize = obj.GetObjectCount(9);
                    for (var i = 0; i < mapSize; i++)
                    {
                        var mapObj = obj.IndexObject(9, (uint)i);
                        var key    = mapObj.GetInt32(1);
                        var value  = mapObj.GetString(2);
                        map.Add(key, value);
                    }
                }

                return(component);
            }
示例#23
0
 public static void Serialize(Other0 instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     obj.AddInt32(1, instance.Foo);
 }
示例#24
0
 public static void Serialize(FirstCommandResponse instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     {
         obj.AddString(1, instance.Response);
     }
 }
示例#25
0
            public static Improbable.Gdk.Tests.BlittableTypes.BlittableComponent.Snapshot DeserializeSnapshot(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new Improbable.Gdk.Tests.BlittableTypes.BlittableComponent.Snapshot();

                {
                    component.BoolField = obj.GetBool(1);
                }

                {
                    component.IntField = obj.GetInt32(2);
                }

                {
                    component.LongField = obj.GetInt64(3);
                }

                {
                    component.FloatField = obj.GetFloat(4);
                }

                {
                    component.DoubleField = obj.GetDouble(5);
                }

                return(component);
            }
示例#26
0
 public static void Serialize(SecondCommandResponse instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     obj.AddDouble(1, instance.Response);
 }
示例#27
0
 public static void Serialize(SecondCommandRequest instance, global::Improbable.Worker.Core.SchemaObject obj)
 {
     obj.AddInt64(1, instance.Field);
 }
 public static void Serialize(SpatialOSComponentWithNoFieldsWithEvents component, global::Improbable.Worker.Core.SchemaObject obj)
 {
 }
            public static Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithEvents.Snapshot DeserializeSnapshot(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithEvents.Snapshot();

                return(component);
            }
示例#30
0
            public static Improbable.Gdk.Tests.AlternateSchemaSyntax.Connection.Component Deserialize(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new Improbable.Gdk.Tests.AlternateSchemaSyntax.Connection.Component();

                return(component);
            }