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); }
public static FirstCommandResponse Deserialize(global::Improbable.Worker.Core.SchemaObject obj) { var instance = new FirstCommandResponse(); instance.Response = obj.GetBool(1); return(instance); }
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); }
public static Improbable.Gdk.Tests.ExhaustiveSingular.Component Deserialize(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world) { var component = new Improbable.Gdk.Tests.ExhaustiveSingular.Component(); { component.Field1 = obj.GetBool(1); } { component.Field2 = obj.GetFloat(2); } component.field3Handle = Improbable.Gdk.Tests.ExhaustiveSingular.ReferenceTypeProviders.Field3Provider.Allocate(world); { component.Field3 = obj.GetBytes(3); } { component.Field4 = obj.GetInt32(4); } { component.Field5 = obj.GetInt64(5); } { component.Field6 = obj.GetDouble(6); } component.field7Handle = Improbable.Gdk.Tests.ExhaustiveSingular.ReferenceTypeProviders.Field7Provider.Allocate(world); { component.Field7 = obj.GetString(7); } { component.Field8 = obj.GetUint32(8); } { component.Field9 = obj.GetUint64(9); } { component.Field10 = obj.GetSint32(10); } { component.Field11 = obj.GetSint64(11); } { component.Field12 = obj.GetFixed32(12); } { component.Field13 = obj.GetFixed64(13); } { component.Field14 = obj.GetSfixed32(14); } { component.Field15 = obj.GetSfixed64(15); } { component.Field16 = obj.GetEntityId(16); } { component.Field17 = global::Improbable.Gdk.Tests.SomeType.Serialization.Deserialize(obj.GetObject(17)); } return(component); }
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); }
public static Improbable.Gdk.Tests.ExhaustiveBlittableSingular.Snapshot DeserializeSnapshot(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world) { var component = new Improbable.Gdk.Tests.ExhaustiveBlittableSingular.Snapshot(); { component.Field1 = obj.GetBool(1); } { component.Field2 = obj.GetFloat(2); } { component.Field4 = obj.GetInt32(4); } { component.Field5 = obj.GetInt64(5); } { component.Field6 = obj.GetDouble(6); } { component.Field8 = obj.GetUint32(8); } { component.Field9 = obj.GetUint64(9); } { component.Field10 = obj.GetSint32(10); } { component.Field11 = obj.GetSint64(11); } { component.Field12 = obj.GetFixed32(12); } { component.Field13 = obj.GetFixed64(13); } { component.Field14 = obj.GetSfixed32(14); } { component.Field15 = obj.GetSfixed64(15); } { component.Field16 = obj.GetEntityId(16); } { component.Field17 = global::Improbable.Gdk.Tests.SomeType.Serialization.Deserialize(obj.GetObject(17)); } return(component); }