示例#1
0
 CommandRequestDeserialize(global::System.UInt32 componentId,
                           global::System.UIntPtr userData,
                           global::Improbable.Worker.CInterop.SchemaCommandRequest source,
                           out global::System.UIntPtr handleOut)
 {
     handleOut = global::System.UIntPtr.Zero;
     try
     {
         var data   = new global::Improbable.Worker.Internal.GenericCommandObject();
         var handle = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         *handle   = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         handleOut = (global::System.UIntPtr)handle;
         if (source.GetCommandIndex() == 1)
         {
             data.CommandId     = 1;
             data.CommandObject = new Commands.Disconnect.Request(global::Improbable.Restricted.DisconnectRequest_Internal.Read(source.GetObject()));
             return(true);
         }
         return(false);
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(false);
     }
 }