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); } }
public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool, NeighborsData _data, global::Improbable.Worker.CInterop.SchemaObject _obj) { if (_data.neighborList != null) { for (int _i = 0; _i < _data.neighborList.Count; ++_i) { _obj.AddInt64(1, _data.neighborList[_i].Id); } } }
public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool, QueryConstraint _data, global::Improbable.Worker.CInterop.SchemaObject _obj) { if (_data.sphereConstraint.HasValue) { global::Improbable.ComponentInterest.SphereConstraint_Internal.Write(_pool, _data.sphereConstraint.Value, _obj.AddObject(1)); } if (_data.cylinderConstraint.HasValue) { global::Improbable.ComponentInterest.CylinderConstraint_Internal.Write(_pool, _data.cylinderConstraint.Value, _obj.AddObject(2)); } if (_data.boxConstraint.HasValue) { global::Improbable.ComponentInterest.BoxConstraint_Internal.Write(_pool, _data.boxConstraint.Value, _obj.AddObject(3)); } if (_data.relativeSphereConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeSphereConstraint_Internal.Write(_pool, _data.relativeSphereConstraint.Value, _obj.AddObject(4)); } if (_data.relativeCylinderConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeCylinderConstraint_Internal.Write(_pool, _data.relativeCylinderConstraint.Value, _obj.AddObject(5)); } if (_data.relativeBoxConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeBoxConstraint_Internal.Write(_pool, _data.relativeBoxConstraint.Value, _obj.AddObject(6)); } if (_data.entityIdConstraint.HasValue) { _obj.AddInt64(7, _data.entityIdConstraint.Value); } if (_data.componentConstraint.HasValue) { _obj.AddUint32(8, _data.componentConstraint.Value); } if (_data.andConstraint != null) { for (int _i = 0; _i < _data.andConstraint.Count; ++_i) { global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.andConstraint[_i], _obj.AddObject(9)); } } if (_data.orConstraint != null) { for (int _i = 0; _i < _data.orConstraint.Count; ++_i) { global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.orConstraint[_i], _obj.AddObject(10)); } } }
public static void Serialize(SecondCommandRequest instance, global::Improbable.Worker.CInterop.SchemaObject obj) { { obj.AddInt64(1, instance.Field); } }
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); } } }
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); } } }
public static void Serialize(QueryConstraint instance, global::Improbable.Worker.CInterop.SchemaObject obj) { { if (instance.SphereConstraint.HasValue) { global::Improbable.ComponentInterest.SphereConstraint.Serialization.Serialize(instance.SphereConstraint.Value, obj.AddObject(1)); } } { if (instance.CylinderConstraint.HasValue) { global::Improbable.ComponentInterest.CylinderConstraint.Serialization.Serialize(instance.CylinderConstraint.Value, obj.AddObject(2)); } } { if (instance.BoxConstraint.HasValue) { global::Improbable.ComponentInterest.BoxConstraint.Serialization.Serialize(instance.BoxConstraint.Value, obj.AddObject(3)); } } { if (instance.RelativeSphereConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeSphereConstraint.Serialization.Serialize(instance.RelativeSphereConstraint.Value, obj.AddObject(4)); } } { if (instance.RelativeCylinderConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeCylinderConstraint.Serialization.Serialize(instance.RelativeCylinderConstraint.Value, obj.AddObject(5)); } } { if (instance.RelativeBoxConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeBoxConstraint.Serialization.Serialize(instance.RelativeBoxConstraint.Value, obj.AddObject(6)); } } { if (instance.EntityIdConstraint.HasValue) { obj.AddInt64(7, instance.EntityIdConstraint.Value); } } { if (instance.ComponentConstraint.HasValue) { obj.AddUint32(8, instance.ComponentConstraint.Value); } } { foreach (var value in instance.AndConstraint) { global::Improbable.ComponentInterest.QueryConstraint.Serialization.Serialize(value, obj.AddObject(9)); } } { foreach (var value in instance.OrConstraint) { global::Improbable.ComponentInterest.QueryConstraint.Serialization.Serialize(value, obj.AddObject(10)); } } }