ClientDeserialize(global::System.UInt32 componentId,
                   void *userData,
                   global::System.Byte handleType,
                   global::Improbable.Worker.Internal.Pbio.Object *root,
                   global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle **handleOut)
 {
     *handleOut = null;
     try
     {
         *handleOut = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data = new Update();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = new Data(global::Improbable.PersistenceData_Internal.Read(
                                     global::Improbable.Worker.Internal.Pbio.GetObject(root, 55)));
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(0);
     }
     return(1);
 }
示例#2
0
 ClientSerialize(global::System.UInt32 componentId,
                 void *userData,
                 global::System.Byte handleType,
                 global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle *handle,
                 global::Improbable.Worker.Internal.Pbio.Object *root)
 {
     try
     {
         var _pool = global::Improbable.Worker.Internal.ClientHandles.Instance.GetGcHandlePool(*handle);
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data        = (Update)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             var stateObject = global::Improbable.Worker.Internal.Pbio.AddObject(
                 global::Improbable.Worker.Internal.Pbio.AddObject(root, /* entity_state */ 2), 103);
             if (data.isAlive.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddBool(stateObject, 1, (byte)(data.isAlive.Value ? 1 : 0));
                 }
             }
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = (Data)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             global::Cell.IsAliveData_Internal.Write(_pool, data.Value, global::Improbable.Worker.Internal.Pbio.AddObject(root, 103));
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 103);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 103);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
     }
 }
示例#3
0
 ClientSerialize(global::System.UInt32 componentId,
                 global::System.Byte handleType,
                 global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle *handle,
                 global::Improbable.Worker.Internal.Pbio.Object *root)
 {
     try
     {
         var _pool = global::Improbable.Worker.Internal.ClientHandles.Instance.GetGcHandlePool(*handle);
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data        = (Update)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             var stateObject = global::Improbable.Worker.Internal.Pbio.AddObject(
                 global::Improbable.Worker.Internal.Pbio.AddObject(root, /* entity_state */ 2), 20152);
             if (data.nestedType.HasValue)
             {
                 {
                     global::Improbable.Gdk.Tests.TypeName_Internal.Write(_pool, data.nestedType.Value, global::Improbable.Worker.Internal.Pbio.AddObject(stateObject, 1));
                 }
             }
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = (Data)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             global::Improbable.Gdk.Tests.NestedComponentData_Internal.Write(_pool, data.Value, global::Improbable.Worker.Internal.Pbio.AddObject(root, 20152));
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 20152);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 20152);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
     }
 }
            public static unsafe Query Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
            {
                Query _data;

                {
                    _data.constraint = global::Improbable.ComponentInterest.QueryConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 1));
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetBoolCount(_obj, 2);
                    if (_count > 0)
                    {
                        _data.fullSnapshotResult = new global::Improbable.Collections.Option <bool>(global::Improbable.Worker.Internal.Pbio.GetBool(_obj, 2) != 0);
                    }
                    else
                    {
                        _data.fullSnapshotResult = new global::Improbable.Collections.Option <bool>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetUint32Count(_obj, 3);
                    _data.resultComponentId = new global::Improbable.Collections.List <uint>((int)_count);
                    for (uint _i = 0; _i < _count; ++_i)
                    {
                        _data.resultComponentId.Add(global::Improbable.Worker.Internal.Pbio.IndexUint32(_obj, 3, _i));
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetFloatCount(_obj, 4);
                    if (_count > 0)
                    {
                        _data.frequency = new global::Improbable.Collections.Option <float>(global::Improbable.Worker.Internal.Pbio.GetFloat(_obj, 4));
                    }
                    else
                    {
                        _data.frequency = new global::Improbable.Collections.Option <float>();
                    }
                }
                return(_data);
            }
 public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool,
                                 Query _data, global::Improbable.Worker.Internal.Pbio.Object *_obj)
 {
     {
         global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.constraint, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 1));
     }
     if (_data.fullSnapshotResult.HasValue)
     {
         global::Improbable.Worker.Internal.Pbio.AddBool(_obj, 2, (byte)(_data.fullSnapshotResult.Value ? 1 : 0));
     }
     if (_data.resultComponentId != null)
     {
         for (int _i = 0; _i < _data.resultComponentId.Count; ++_i)
         {
             global::Improbable.Worker.Internal.Pbio.AddUint32(_obj, 3, _data.resultComponentId[_i]);
         }
     }
     if (_data.frequency.HasValue)
     {
         global::Improbable.Worker.Internal.Pbio.AddFloat(_obj, 4, _data.frequency.Value);
     }
 }
 ClientSerialize(global::System.UInt32 componentId,
                 global::System.Byte handleType,
                 global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle *handle,
                 global::Improbable.Worker.Internal.Pbio.Object *root)
 {
     try
     {
         var _pool = global::Improbable.Worker.Internal.ClientHandles.Instance.GetGcHandlePool(*handle);
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data        = (Update)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             var stateObject = global::Improbable.Worker.Internal.Pbio.AddObject(
                 global::Improbable.Worker.Internal.Pbio.AddObject(root, /* entity_state */ 2), 197717);
             if (data.field2.HasValue)
             {
                 if (data.field2.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 2);
                 }
                 for (int _i = 0; _i < data.field2.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddFloat(stateObject, 2, data.field2.Value[_i]);
                 }
             }
             if (data.field4.HasValue)
             {
                 if (data.field4.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 4);
                 }
                 for (int _i = 0; _i < data.field4.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddInt32(stateObject, 4, data.field4.Value[_i]);
                 }
             }
             if (data.field5.HasValue)
             {
                 if (data.field5.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 5);
                 }
                 for (int _i = 0; _i < data.field5.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddInt64(stateObject, 5, data.field5.Value[_i]);
                 }
             }
             if (data.field6.HasValue)
             {
                 if (data.field6.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 6);
                 }
                 for (int _i = 0; _i < data.field6.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddDouble(stateObject, 6, data.field6.Value[_i]);
                 }
             }
             if (data.field7.HasValue)
             {
                 if (data.field7.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 7);
                 }
                 for (int _i = 0; _i < data.field7.Value.Count; ++_i)
                 {
                     if (data.field7.Value[_i] != null)
                     {
                         var _buffer = global::System.Text.Encoding.UTF8.GetBytes(data.field7.Value[_i]);
                         global::Improbable.Worker.Internal.Pbio.AddBytes(stateObject, 7, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
                     }
                     else
                     {
                         global::Improbable.Worker.Internal.Pbio.AddBytes(stateObject, 7, null, 0);
                     }
                 }
             }
             if (data.field8.HasValue)
             {
                 if (data.field8.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 8);
                 }
                 for (int _i = 0; _i < data.field8.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(stateObject, 8, data.field8.Value[_i]);
                 }
             }
             if (data.field9.HasValue)
             {
                 if (data.field9.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 9);
                 }
                 for (int _i = 0; _i < data.field9.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint64(stateObject, 9, data.field9.Value[_i]);
                 }
             }
             if (data.field10.HasValue)
             {
                 if (data.field10.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 10);
                 }
                 for (int _i = 0; _i < data.field10.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSint32(stateObject, 10, data.field10.Value[_i]);
                 }
             }
             if (data.field11.HasValue)
             {
                 if (data.field11.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 11);
                 }
                 for (int _i = 0; _i < data.field11.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSint64(stateObject, 11, data.field11.Value[_i]);
                 }
             }
             if (data.field12.HasValue)
             {
                 if (data.field12.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 12);
                 }
                 for (int _i = 0; _i < data.field12.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddFixed32(stateObject, 12, data.field12.Value[_i]);
                 }
             }
             if (data.field13.HasValue)
             {
                 if (data.field13.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 13);
                 }
                 for (int _i = 0; _i < data.field13.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddFixed64(stateObject, 13, data.field13.Value[_i]);
                 }
             }
             if (data.field14.HasValue)
             {
                 if (data.field14.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 14);
                 }
                 for (int _i = 0; _i < data.field14.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSfixed32(stateObject, 14, data.field14.Value[_i]);
                 }
             }
             if (data.field15.HasValue)
             {
                 if (data.field15.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 15);
                 }
                 for (int _i = 0; _i < data.field15.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSfixed64(stateObject, 15, data.field15.Value[_i]);
                 }
             }
             if (data.field16.HasValue)
             {
                 if (data.field16.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 16);
                 }
                 for (int _i = 0; _i < data.field16.Value.Count; ++_i)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddInt64(stateObject, 16, data.field16.Value[_i].Id);
                 }
             }
             if (data.field17.HasValue)
             {
                 if (data.field17.Value.Count == 0)
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(root, /* fields to clear */ 1, 17);
                 }
                 for (int _i = 0; _i < data.field17.Value.Count; ++_i)
                 {
                     global::Improbable.Gdk.Tests.SomeType_Internal.Write(_pool, data.field17.Value[_i], global::Improbable.Worker.Internal.Pbio.AddObject(stateObject, 17));
                 }
             }
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = (Data)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             global::Improbable.Gdk.Tests.ExhaustiveRepeatedData_Internal.Write(_pool, data.Value, global::Improbable.Worker.Internal.Pbio.AddObject(root, 197717));
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 197717);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 197717);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
     }
 }
 ClientDeserialize(global::System.UInt32 componentId,
                   global::System.Byte handleType,
                   global::Improbable.Worker.Internal.Pbio.Object *root,
                   global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle **handleOut)
 {
     *handleOut = null;
     try
     {
         *handleOut = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data               = new Update();
             var fieldsToClear      = new global::System.Collections.Generic.HashSet <uint>();
             var fieldsToClearCount = global::Improbable.Worker.Internal.Pbio.GetUint32Count(root, /* fields to clear */ 1);
             for (uint i = 0; i < fieldsToClearCount; ++i)
             {
                 fieldsToClear.Add(global::Improbable.Worker.Internal.Pbio.IndexUint32(root, /* fields to clear */ 1, i));
             }
             var stateObject = global::Improbable.Worker.Internal.Pbio.GetObject(
                 global::Improbable.Worker.Internal.Pbio.GetObject(root, /* entity_state */ 2), 197717);
             if (global::Improbable.Worker.Internal.Pbio.GetFloatCount(stateObject, 2) > 0 || fieldsToClear.Contains(2))
             {
                 global::Improbable.Collections.List <float> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetFloatCount(stateObject, 2);
                     field = new global::Improbable.Collections.List <float>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexFloat(stateObject, 2, _i));
                     }
                 }
                 data.field2.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetInt32Count(stateObject, 4) > 0 || fieldsToClear.Contains(4))
             {
                 global::Improbable.Collections.List <int> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetInt32Count(stateObject, 4);
                     field = new global::Improbable.Collections.List <int>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexInt32(stateObject, 4, _i));
                     }
                 }
                 data.field4.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetInt64Count(stateObject, 5) > 0 || fieldsToClear.Contains(5))
             {
                 global::Improbable.Collections.List <long> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetInt64Count(stateObject, 5);
                     field = new global::Improbable.Collections.List <long>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexInt64(stateObject, 5, _i));
                     }
                 }
                 data.field5.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetDoubleCount(stateObject, 6) > 0 || fieldsToClear.Contains(6))
             {
                 global::Improbable.Collections.List <double> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetDoubleCount(stateObject, 6);
                     field = new global::Improbable.Collections.List <double>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexDouble(stateObject, 6, _i));
                     }
                 }
                 data.field6.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetBytesCount(stateObject, 7) > 0 || fieldsToClear.Contains(7))
             {
                 global::Improbable.Collections.List <string> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetBytesCount(stateObject, 7);
                     field = new global::Improbable.Collections.List <string>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.IndexBytes(stateObject, 7, _i), global::Improbable.Worker.Internal.Pbio.IndexBytesLength(stateObject, 7, _i)).BackingArray));
                     }
                 }
                 data.field7.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetUint32Count(stateObject, 8) > 0 || fieldsToClear.Contains(8))
             {
                 global::Improbable.Collections.List <uint> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetUint32Count(stateObject, 8);
                     field = new global::Improbable.Collections.List <uint>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexUint32(stateObject, 8, _i));
                     }
                 }
                 data.field8.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetUint64Count(stateObject, 9) > 0 || fieldsToClear.Contains(9))
             {
                 global::Improbable.Collections.List <ulong> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetUint64Count(stateObject, 9);
                     field = new global::Improbable.Collections.List <ulong>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexUint64(stateObject, 9, _i));
                     }
                 }
                 data.field9.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSint32Count(stateObject, 10) > 0 || fieldsToClear.Contains(10))
             {
                 global::Improbable.Collections.List <int> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetSint32Count(stateObject, 10);
                     field = new global::Improbable.Collections.List <int>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexSint32(stateObject, 10, _i));
                     }
                 }
                 data.field10.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSint64Count(stateObject, 11) > 0 || fieldsToClear.Contains(11))
             {
                 global::Improbable.Collections.List <long> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetSint64Count(stateObject, 11);
                     field = new global::Improbable.Collections.List <long>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexSint64(stateObject, 11, _i));
                     }
                 }
                 data.field11.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetFixed32Count(stateObject, 12) > 0 || fieldsToClear.Contains(12))
             {
                 global::Improbable.Collections.List <uint> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetFixed32Count(stateObject, 12);
                     field = new global::Improbable.Collections.List <uint>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexFixed32(stateObject, 12, _i));
                     }
                 }
                 data.field12.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetFixed64Count(stateObject, 13) > 0 || fieldsToClear.Contains(13))
             {
                 global::Improbable.Collections.List <ulong> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetFixed64Count(stateObject, 13);
                     field = new global::Improbable.Collections.List <ulong>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexFixed64(stateObject, 13, _i));
                     }
                 }
                 data.field13.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSfixed32Count(stateObject, 14) > 0 || fieldsToClear.Contains(14))
             {
                 global::Improbable.Collections.List <int> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetSfixed32Count(stateObject, 14);
                     field = new global::Improbable.Collections.List <int>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexSfixed32(stateObject, 14, _i));
                     }
                 }
                 data.field14.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSfixed64Count(stateObject, 15) > 0 || fieldsToClear.Contains(15))
             {
                 global::Improbable.Collections.List <long> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetSfixed64Count(stateObject, 15);
                     field = new global::Improbable.Collections.List <long>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Worker.Internal.Pbio.IndexSfixed64(stateObject, 15, _i));
                     }
                 }
                 data.field15.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetInt64Count(stateObject, 16) > 0 || fieldsToClear.Contains(16))
             {
                 global::Improbable.Collections.List <global::Improbable.EntityId> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetInt64Count(stateObject, 16);
                     field = new global::Improbable.Collections.List <global::Improbable.EntityId>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(new global::Improbable.EntityId(global::Improbable.Worker.Internal.Pbio.IndexInt64(stateObject, 16, _i)));
                     }
                 }
                 data.field16.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 17) > 0 || fieldsToClear.Contains(17))
             {
                 global::Improbable.Collections.List <global::Improbable.Gdk.Tests.SomeType> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 17);
                     field = new global::Improbable.Collections.List <global::Improbable.Gdk.Tests.SomeType>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         field.Add(global::Improbable.Gdk.Tests.SomeType_Internal.Read(global::Improbable.Worker.Internal.Pbio.IndexObject(stateObject, 17, _i)));
                     }
                 }
                 data.field17.Set(field);
             }
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = new Data(global::Improbable.Gdk.Tests.ExhaustiveRepeatedData_Internal.Read(
                                     global::Improbable.Worker.Internal.Pbio.GetObject(root, 197717)));
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(0);
     }
     return(1);
 }
示例#8
0
        public static unsafe SomeType Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
        {
            SomeType _data;

            return(_data);
        }
示例#9
0
 public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool,
                                 SomeType _data, global::Improbable.Worker.Internal.Pbio.Object *_obj)
 {
 }
        public static unsafe PingResponderData Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
        {
            PingResponderData _data;

            return(_data);
        }
示例#11
0
 public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool,
                                 ExhaustiveRepeatedData _data, global::Improbable.Worker.Internal.Pbio.Object *_obj)
 {
     for (int _i = 0; _i < _data.field2.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddFloat(_obj, 2, _data.field2[_i]);
     }
     for (int _i = 0; _i < _data.field4.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddInt32(_obj, 4, _data.field4[_i]);
     }
     for (int _i = 0; _i < _data.field5.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddInt64(_obj, 5, _data.field5[_i]);
     }
     for (int _i = 0; _i < _data.field6.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddDouble(_obj, 6, _data.field6[_i]);
     }
     for (int _i = 0; _i < _data.field7.Count; ++_i)
     {
         if (_data.field7[_i] != null)
         {
             var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_data.field7[_i]);
             global::Improbable.Worker.Internal.Pbio.AddBytes(_obj, 7, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
         }
         else
         {
             global::Improbable.Worker.Internal.Pbio.AddBytes(_obj, 7, null, 0);
         }
     }
     for (int _i = 0; _i < _data.field8.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddUint32(_obj, 8, _data.field8[_i]);
     }
     for (int _i = 0; _i < _data.field9.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddUint64(_obj, 9, _data.field9[_i]);
     }
     for (int _i = 0; _i < _data.field10.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddSint32(_obj, 10, _data.field10[_i]);
     }
     for (int _i = 0; _i < _data.field11.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddSint64(_obj, 11, _data.field11[_i]);
     }
     for (int _i = 0; _i < _data.field12.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddFixed32(_obj, 12, _data.field12[_i]);
     }
     for (int _i = 0; _i < _data.field13.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddFixed64(_obj, 13, _data.field13[_i]);
     }
     for (int _i = 0; _i < _data.field14.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddSfixed32(_obj, 14, _data.field14[_i]);
     }
     for (int _i = 0; _i < _data.field15.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddSfixed64(_obj, 15, _data.field15[_i]);
     }
     for (int _i = 0; _i < _data.field16.Count; ++_i)
     {
         global::Improbable.Worker.Internal.Pbio.AddInt64(_obj, 16, _data.field16[_i].Id);
     }
     for (int _i = 0; _i < _data.field17.Count; ++_i)
     {
         global::Improbable.Gdk.Tests.SomeType_Internal.Write(_pool, _data.field17[_i], global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 17));
     }
 }
示例#12
0
 public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool,
                                 ExhaustiveMapValueData _data, global::Improbable.Worker.Internal.Pbio.Object *_obj)
 {
     for (var _node = _data.field2.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 2);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddFloat(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field4.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 4);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddInt32(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field5.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 5);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddInt64(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field6.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 6);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddDouble(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field7.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 7);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             if (_node.Value.Value != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Value);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 2, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 2, null, 0);
             }
         }
     }
     for (var _node = _data.field8.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 8);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddUint32(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field9.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 9);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddUint64(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field10.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 10);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddSint32(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field11.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 11);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddSint64(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field12.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 12);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddFixed32(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field13.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 13);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddFixed64(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field14.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 14);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddSfixed32(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field15.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 15);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddSfixed64(_pair, 2, _node.Value.Value);
         }
     }
     for (var _node = _data.field16.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 16);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Worker.Internal.Pbio.AddInt64(_pair, 2, _node.Value.Value.Id);
         }
     }
     for (var _node = _data.field17.First; _node != null; _node = _node.Next)
     {
         var _pair = global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 17);
         {
             if (_node.Value.Key != null)
             {
                 var _buffer = global::System.Text.Encoding.UTF8.GetBytes(_node.Value.Key);
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, (byte *)_pool.Pin(_buffer), (uint)_buffer.Length);
             }
             else
             {
                 global::Improbable.Worker.Internal.Pbio.AddBytes(_pair, 1, null, 0);
             }
         }
         {
             global::Improbable.Gdk.Tests.SomeType_Internal.Write(_pool, _node.Value.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_pair, 2));
         }
     }
 }
 ClientSerialize(global::System.UInt32 componentId,
                 global::System.Byte handleType,
                 global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle *handle,
                 global::Improbable.Worker.Internal.Pbio.Object *root)
 {
     try
     {
         var _pool = global::Improbable.Worker.Internal.ClientHandles.Instance.GetGcHandlePool(*handle);
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data        = (Update)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             var stateObject = global::Improbable.Worker.Internal.Pbio.AddObject(
                 global::Improbable.Worker.Internal.Pbio.AddObject(root, /* entity_state */ 2), 197720);
             if (data.field1.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddBool(stateObject, 1, (byte)(data.field1.Value ? 1 : 0));
                 }
             }
             if (data.field2.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddFloat(stateObject, 2, data.field2.Value);
                 }
             }
             if (data.field4.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddInt32(stateObject, 4, data.field4.Value);
                 }
             }
             if (data.field5.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddInt64(stateObject, 5, data.field5.Value);
                 }
             }
             if (data.field6.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddDouble(stateObject, 6, data.field6.Value);
                 }
             }
             if (data.field8.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint32(stateObject, 8, data.field8.Value);
                 }
             }
             if (data.field9.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddUint64(stateObject, 9, data.field9.Value);
                 }
             }
             if (data.field10.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSint32(stateObject, 10, data.field10.Value);
                 }
             }
             if (data.field11.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSint64(stateObject, 11, data.field11.Value);
                 }
             }
             if (data.field12.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddFixed32(stateObject, 12, data.field12.Value);
                 }
             }
             if (data.field13.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddFixed64(stateObject, 13, data.field13.Value);
                 }
             }
             if (data.field14.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSfixed32(stateObject, 14, data.field14.Value);
                 }
             }
             if (data.field15.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddSfixed64(stateObject, 15, data.field15.Value);
                 }
             }
             if (data.field16.HasValue)
             {
                 {
                     global::Improbable.Worker.Internal.Pbio.AddInt64(stateObject, 16, data.field16.Value.Id);
                 }
             }
             if (data.field17.HasValue)
             {
                 {
                     global::Improbable.Gdk.Tests.SomeType_Internal.Write(_pool, data.field17.Value, global::Improbable.Worker.Internal.Pbio.AddObject(stateObject, 17));
                 }
             }
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = (Data)global::Improbable.Worker.Internal.ClientHandles.Instance.Dereference(*handle);
             global::Improbable.Gdk.Tests.ExhaustiveBlittableSingularData_Internal.Write(_pool, data.Value, global::Improbable.Worker.Internal.Pbio.AddObject(root, 197720));
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 197720);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             global::Improbable.Worker.Internal.Pbio.AddObject(root, 197720);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
     }
 }
 ClientDeserialize(global::System.UInt32 componentId,
                   global::System.Byte handleType,
                   global::Improbable.Worker.Internal.Pbio.Object *root,
                   global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle **handleOut)
 {
     *handleOut = null;
     try
     {
         *handleOut = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data               = new Update();
             var fieldsToClear      = new global::System.Collections.Generic.HashSet <uint>();
             var fieldsToClearCount = global::Improbable.Worker.Internal.Pbio.GetUint32Count(root, /* fields to clear */ 1);
             for (uint i = 0; i < fieldsToClearCount; ++i)
             {
                 fieldsToClear.Add(global::Improbable.Worker.Internal.Pbio.IndexUint32(root, /* fields to clear */ 1, i));
             }
             var stateObject = global::Improbable.Worker.Internal.Pbio.GetObject(
                 global::Improbable.Worker.Internal.Pbio.GetObject(root, /* entity_state */ 2), 197720);
             if (global::Improbable.Worker.Internal.Pbio.GetBoolCount(stateObject, 1) > 0)
             {
                 bool field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetBool(stateObject, 1) != 0;
                 }
                 data.field1.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetFloatCount(stateObject, 2) > 0)
             {
                 float field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetFloat(stateObject, 2);
                 }
                 data.field2.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetInt32Count(stateObject, 4) > 0)
             {
                 int field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetInt32(stateObject, 4);
                 }
                 data.field4.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetInt64Count(stateObject, 5) > 0)
             {
                 long field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetInt64(stateObject, 5);
                 }
                 data.field5.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetDoubleCount(stateObject, 6) > 0)
             {
                 double field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetDouble(stateObject, 6);
                 }
                 data.field6.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetUint32Count(stateObject, 8) > 0)
             {
                 uint field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetUint32(stateObject, 8);
                 }
                 data.field8.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetUint64Count(stateObject, 9) > 0)
             {
                 ulong field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetUint64(stateObject, 9);
                 }
                 data.field9.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSint32Count(stateObject, 10) > 0)
             {
                 int field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetSint32(stateObject, 10);
                 }
                 data.field10.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSint64Count(stateObject, 11) > 0)
             {
                 long field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetSint64(stateObject, 11);
                 }
                 data.field11.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetFixed32Count(stateObject, 12) > 0)
             {
                 uint field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetFixed32(stateObject, 12);
                 }
                 data.field12.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetFixed64Count(stateObject, 13) > 0)
             {
                 ulong field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetFixed64(stateObject, 13);
                 }
                 data.field13.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSfixed32Count(stateObject, 14) > 0)
             {
                 int field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetSfixed32(stateObject, 14);
                 }
                 data.field14.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetSfixed64Count(stateObject, 15) > 0)
             {
                 long field;
                 {
                     field = global::Improbable.Worker.Internal.Pbio.GetSfixed64(stateObject, 15);
                 }
                 data.field15.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetInt64Count(stateObject, 16) > 0)
             {
                 global::Improbable.EntityId field;
                 {
                     field = new global::Improbable.EntityId(global::Improbable.Worker.Internal.Pbio.GetInt64(stateObject, 16));
                 }
                 data.field16.Set(field);
             }
             if (global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 17) > 0)
             {
                 global::Improbable.Gdk.Tests.SomeType field;
                 {
                     field = global::Improbable.Gdk.Tests.SomeType_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(stateObject, 17));
                 }
                 data.field17.Set(field);
             }
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = new Data(global::Improbable.Gdk.Tests.ExhaustiveBlittableSingularData_Internal.Read(
                                     global::Improbable.Worker.Internal.Pbio.GetObject(root, 197720)));
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(0);
     }
     return(1);
 }
示例#15
0
 ClientDeserialize(global::System.UInt32 componentId,
                   void *userData,
                   global::System.Byte handleType,
                   global::Improbable.Worker.Internal.Pbio.Object *root,
                   global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle **handleOut)
 {
     *handleOut = null;
     try
     {
         *handleOut = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data               = new Update();
             var fieldsToClear      = new global::System.Collections.Generic.HashSet <uint>();
             var fieldsToClearCount = global::Improbable.Worker.Internal.Pbio.GetUint32Count(root, /* fields to clear */ 1);
             for (uint i = 0; i < fieldsToClearCount; ++i)
             {
                 fieldsToClear.Add(global::Improbable.Worker.Internal.Pbio.IndexUint32(root, /* fields to clear */ 1, i));
             }
             var stateObject = global::Improbable.Worker.Internal.Pbio.GetObject(
                 global::Improbable.Worker.Internal.Pbio.GetObject(root, /* entity_state */ 2), 58);
             if (global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 1) > 0 || fieldsToClear.Contains(1))
             {
                 global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 1);
                     field = new global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(stateObject, 1, _i);
                         field.Add(global::Improbable.Worker.Internal.Pbio.GetUint32(_pair, 1), global::Improbable.ComponentInterest_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_pair, 2)));
                     }
                 }
                 data.componentInterest.Set(field);
             }
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = new Data(global::Improbable.InterestData_Internal.Read(
                                     global::Improbable.Worker.Internal.Pbio.GetObject(root, 58)));
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(0);
     }
     return(1);
 }
            public static unsafe QueryConstraint Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
            {
                QueryConstraint _data;

                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 1);
                    if (_count > 0)
                    {
                        _data.sphereConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.SphereConstraint>(global::Improbable.ComponentInterest.SphereConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 1)));
                    }
                    else
                    {
                        _data.sphereConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.SphereConstraint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 2);
                    if (_count > 0)
                    {
                        _data.cylinderConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.CylinderConstraint>(global::Improbable.ComponentInterest.CylinderConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 2)));
                    }
                    else
                    {
                        _data.cylinderConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.CylinderConstraint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 3);
                    if (_count > 0)
                    {
                        _data.boxConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.BoxConstraint>(global::Improbable.ComponentInterest.BoxConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 3)));
                    }
                    else
                    {
                        _data.boxConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.BoxConstraint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 4);
                    if (_count > 0)
                    {
                        _data.relativeSphereConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.RelativeSphereConstraint>(global::Improbable.ComponentInterest.RelativeSphereConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 4)));
                    }
                    else
                    {
                        _data.relativeSphereConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.RelativeSphereConstraint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 5);
                    if (_count > 0)
                    {
                        _data.relativeCylinderConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.RelativeCylinderConstraint>(global::Improbable.ComponentInterest.RelativeCylinderConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 5)));
                    }
                    else
                    {
                        _data.relativeCylinderConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.RelativeCylinderConstraint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 6);
                    if (_count > 0)
                    {
                        _data.relativeBoxConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.RelativeBoxConstraint>(global::Improbable.ComponentInterest.RelativeBoxConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 6)));
                    }
                    else
                    {
                        _data.relativeBoxConstraint = new global::Improbable.Collections.Option <global::Improbable.ComponentInterest.RelativeBoxConstraint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetInt64Count(_obj, 7);
                    if (_count > 0)
                    {
                        _data.entityIdConstraint = new global::Improbable.Collections.Option <long>(global::Improbable.Worker.Internal.Pbio.GetInt64(_obj, 7));
                    }
                    else
                    {
                        _data.entityIdConstraint = new global::Improbable.Collections.Option <long>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetUint32Count(_obj, 8);
                    if (_count > 0)
                    {
                        _data.componentConstraint = new global::Improbable.Collections.Option <uint>(global::Improbable.Worker.Internal.Pbio.GetUint32(_obj, 8));
                    }
                    else
                    {
                        _data.componentConstraint = new global::Improbable.Collections.Option <uint>();
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 9);
                    _data.andConstraint = new global::Improbable.Collections.List <global::Improbable.ComponentInterest.QueryConstraint>((int)_count);
                    for (uint _i = 0; _i < _count; ++_i)
                    {
                        _data.andConstraint.Add(global::Improbable.ComponentInterest.QueryConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 9, _i)));
                    }
                }
                {
                    var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 10);
                    _data.orConstraint = new global::Improbable.Collections.List <global::Improbable.ComponentInterest.QueryConstraint>((int)_count);
                    for (uint _i = 0; _i < _count; ++_i)
                    {
                        _data.orConstraint.Add(global::Improbable.ComponentInterest.QueryConstraint_Internal.Read(global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 10, _i)));
                    }
                }
                return(_data);
            }
示例#17
0
        public static unsafe ExhaustiveOptionalData Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
        {
            ExhaustiveOptionalData _data;

            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetFloatCount(_obj, 2);
                if (_count > 0)
                {
                    _data.field2 = new global::Improbable.Collections.Option <float>(global::Improbable.Worker.Internal.Pbio.GetFloat(_obj, 2));
                }
                else
                {
                    _data.field2 = new global::Improbable.Collections.Option <float>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetInt32Count(_obj, 4);
                if (_count > 0)
                {
                    _data.field4 = new global::Improbable.Collections.Option <int>(global::Improbable.Worker.Internal.Pbio.GetInt32(_obj, 4));
                }
                else
                {
                    _data.field4 = new global::Improbable.Collections.Option <int>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetInt64Count(_obj, 5);
                if (_count > 0)
                {
                    _data.field5 = new global::Improbable.Collections.Option <long>(global::Improbable.Worker.Internal.Pbio.GetInt64(_obj, 5));
                }
                else
                {
                    _data.field5 = new global::Improbable.Collections.Option <long>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetDoubleCount(_obj, 6);
                if (_count > 0)
                {
                    _data.field6 = new global::Improbable.Collections.Option <double>(global::Improbable.Worker.Internal.Pbio.GetDouble(_obj, 6));
                }
                else
                {
                    _data.field6 = new global::Improbable.Collections.Option <double>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetUint32Count(_obj, 8);
                if (_count > 0)
                {
                    _data.field8 = new global::Improbable.Collections.Option <uint>(global::Improbable.Worker.Internal.Pbio.GetUint32(_obj, 8));
                }
                else
                {
                    _data.field8 = new global::Improbable.Collections.Option <uint>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetUint64Count(_obj, 9);
                if (_count > 0)
                {
                    _data.field9 = new global::Improbable.Collections.Option <ulong>(global::Improbable.Worker.Internal.Pbio.GetUint64(_obj, 9));
                }
                else
                {
                    _data.field9 = new global::Improbable.Collections.Option <ulong>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetSint32Count(_obj, 10);
                if (_count > 0)
                {
                    _data.field10 = new global::Improbable.Collections.Option <int>(global::Improbable.Worker.Internal.Pbio.GetSint32(_obj, 10));
                }
                else
                {
                    _data.field10 = new global::Improbable.Collections.Option <int>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetSint64Count(_obj, 11);
                if (_count > 0)
                {
                    _data.field11 = new global::Improbable.Collections.Option <long>(global::Improbable.Worker.Internal.Pbio.GetSint64(_obj, 11));
                }
                else
                {
                    _data.field11 = new global::Improbable.Collections.Option <long>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetFixed32Count(_obj, 12);
                if (_count > 0)
                {
                    _data.field12 = new global::Improbable.Collections.Option <uint>(global::Improbable.Worker.Internal.Pbio.GetFixed32(_obj, 12));
                }
                else
                {
                    _data.field12 = new global::Improbable.Collections.Option <uint>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetFixed64Count(_obj, 13);
                if (_count > 0)
                {
                    _data.field13 = new global::Improbable.Collections.Option <ulong>(global::Improbable.Worker.Internal.Pbio.GetFixed64(_obj, 13));
                }
                else
                {
                    _data.field13 = new global::Improbable.Collections.Option <ulong>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetSfixed32Count(_obj, 14);
                if (_count > 0)
                {
                    _data.field14 = new global::Improbable.Collections.Option <int>(global::Improbable.Worker.Internal.Pbio.GetSfixed32(_obj, 14));
                }
                else
                {
                    _data.field14 = new global::Improbable.Collections.Option <int>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetSfixed64Count(_obj, 15);
                if (_count > 0)
                {
                    _data.field15 = new global::Improbable.Collections.Option <long>(global::Improbable.Worker.Internal.Pbio.GetSfixed64(_obj, 15));
                }
                else
                {
                    _data.field15 = new global::Improbable.Collections.Option <long>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetInt64Count(_obj, 16);
                if (_count > 0)
                {
                    _data.field16 = new global::Improbable.Collections.Option <global::Improbable.EntityId>(new global::Improbable.EntityId(global::Improbable.Worker.Internal.Pbio.GetInt64(_obj, 16)));
                }
                else
                {
                    _data.field16 = new global::Improbable.Collections.Option <global::Improbable.EntityId>();
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 17);
                if (_count > 0)
                {
                    _data.field17 = new global::Improbable.Collections.Option <global::Improbable.Gdk.Tests.SomeType>(global::Improbable.Gdk.Tests.SomeType_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_obj, 17)));
                }
                else
                {
                    _data.field17 = new global::Improbable.Collections.Option <global::Improbable.Gdk.Tests.SomeType>();
                }
            }
            return(_data);
        }
        public static unsafe PersistenceData Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
        {
            PersistenceData _data;

            return(_data);
        }
示例#19
0
        public static unsafe ExhaustiveMapValueData Read(global::Improbable.Worker.Internal.Pbio.Object *_obj)
        {
            ExhaustiveMapValueData _data;

            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 2);
                _data.field2 = new global::Improbable.Collections.Map <string, float>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 2, _i);
                    _data.field2.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetFloat(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 4);
                _data.field4 = new global::Improbable.Collections.Map <string, int>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 4, _i);
                    _data.field4.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetInt32(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 5);
                _data.field5 = new global::Improbable.Collections.Map <string, long>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 5, _i);
                    _data.field5.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetInt64(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 6);
                _data.field6 = new global::Improbable.Collections.Map <string, double>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 6, _i);
                    _data.field6.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetDouble(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 7);
                _data.field7 = new global::Improbable.Collections.Map <string, string>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 7, _i);
                    _data.field7.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 2), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 2)).BackingArray));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 8);
                _data.field8 = new global::Improbable.Collections.Map <string, uint>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 8, _i);
                    _data.field8.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetUint32(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 9);
                _data.field9 = new global::Improbable.Collections.Map <string, ulong>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 9, _i);
                    _data.field9.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetUint64(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 10);
                _data.field10 = new global::Improbable.Collections.Map <string, int>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 10, _i);
                    _data.field10.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetSint32(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 11);
                _data.field11 = new global::Improbable.Collections.Map <string, long>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 11, _i);
                    _data.field11.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetSint64(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 12);
                _data.field12 = new global::Improbable.Collections.Map <string, uint>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 12, _i);
                    _data.field12.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetFixed32(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 13);
                _data.field13 = new global::Improbable.Collections.Map <string, ulong>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 13, _i);
                    _data.field13.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetFixed64(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 14);
                _data.field14 = new global::Improbable.Collections.Map <string, int>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 14, _i);
                    _data.field14.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetSfixed32(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 15);
                _data.field15 = new global::Improbable.Collections.Map <string, long>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 15, _i);
                    _data.field15.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Worker.Internal.Pbio.GetSfixed64(_pair, 2));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 16);
                _data.field16 = new global::Improbable.Collections.Map <string, global::Improbable.EntityId>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 16, _i);
                    _data.field16.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), new global::Improbable.EntityId(global::Improbable.Worker.Internal.Pbio.GetInt64(_pair, 2)));
                }
            }
            {
                var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(_obj, 17);
                _data.field17 = new global::Improbable.Collections.Map <string, global::Improbable.Gdk.Tests.SomeType>((int)_count);
                for (uint _i = 0; _i < _count; ++_i)
                {
                    var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(_obj, 17, _i);
                    _data.field17.Add(global::System.Text.Encoding.UTF8.GetString(global::Improbable.Worker.Bytes.CopyOf(global::Improbable.Worker.Internal.Pbio.GetBytes(_pair, 1), global::Improbable.Worker.Internal.Pbio.GetBytesLength(_pair, 1)).BackingArray), global::Improbable.Gdk.Tests.SomeType_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_pair, 2)));
                }
            }
            return(_data);
        }
 public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool,
                                 PingResponderData _data, global::Improbable.Worker.Internal.Pbio.Object *_obj)
 {
 }