Example #1
0
        public static global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest ToSpatial(global::Generated.Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest nativeType)
        {
            var spatialType = new global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest();

            spatialType.field = nativeType.Field;
            return(spatialType);
        }
Example #2
0
        public static SecondCommandRequest ToNative(global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest spatialType)
        {
            var nativeType = new SecondCommandRequest();

            nativeType.Field = spatialType.field;
            return(nativeType);
        }
Example #3
0
 public ReceivedRequest(long requestId,
                        string callerWorkerId,
                        List <string> callerAttributeSet,
                        global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest request)
 {
     RequestId          = requestId;
     CallerWorkerId     = callerWorkerId;
     CallerAttributeSet = callerAttributeSet;
     Payload            = request;
 }
Example #4
0
 public Request(
     EntityId targetEntityId,
     global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest request,
     uint?timeoutMillis        = null,
     bool allowShortCircuiting = false,
     object context            = null)
 {
     TargetEntityId       = targetEntityId;
     Payload              = request;
     TimeoutMillis        = timeoutMillis;
     AllowShortCircuiting = allowShortCircuiting;
     Context              = context;
 }
                public long SendSecondCommandRequest(EntityId entityId, global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest payload,
                                                     uint?timeoutMillis = null, bool allowShortCircuiting = false, object context = null)
                {
                    if (!VerifyNotDisposed())
                    {
                        return(-1);
                    }

                    var ecsCommandRequestSender = entityManager.GetComponentData <CommandSenders.SecondCommand>(entity);
                    var request = SecondCommand.CreateRequest(entityId, payload, timeoutMillis, allowShortCircuiting, context);

                    ecsCommandRequestSender.RequestsToSend.Add(request);
                    return(request.RequestId);
                }
Example #6
0
                public long SendSecondCommandRequest(EntityId entityId, global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest payload,
                                                     Action <SecondCommand.ReceivedResponse> callback, uint?timeoutMillis = null, bool allowShortCircuiting = false)
                {
                    if (!IsValid())
                    {
                        return(-1);
                    }

                    var ecsCommandRequestSender = entityManager.GetComponentData <CommandSenders.SecondCommand>(entity);
                    var request = SecondCommand.CreateRequest(entityId, payload, timeoutMillis, allowShortCircuiting, callback);

                    ecsCommandRequestSender.RequestsToSend.Add(request);
                    return(request.RequestId);
                }
Example #7
0
 public ReceivedResponse(EntityId entityId,
                         string message,
                         StatusCode statusCode,
                         global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandResponse?response,
                         global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest request,
                         System.Object context,
                         long requestId)
 {
     EntityId        = entityId;
     Message         = message;
     StatusCode      = statusCode;
     ResponsePayload = response;
     RequestPayload  = request;
     Context         = context;
     RequestId       = requestId;
 }
Example #8
0
 public static Request CreateRequest(EntityId targetEntityId,
                                     global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest request,
                                     uint?timeoutMillis        = null,
                                     bool allowShortCircuiting = false,
                                     System.Object context     = null)
 {
     return(new Request
     {
         TargetEntityId = targetEntityId,
         Payload = request,
         TimeoutMillis = timeoutMillis,
         AllowShortCircuiting = allowShortCircuiting,
         Context = context,
         RequestId = global::Improbable.Gdk.Core.CommandRequestIdGenerator.GetNext(),
     });
 }
Example #9
0
        public void SendSecondCommandCommand(EntityId targetEntityId, global::Improbable.Gdk.Tests.NonblittableTypes.SecondCommandRequest request, Action <global::Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.SecondCommand.ReceivedResponse> callback = null)
        {
            var commandRequest = new NonBlittableComponent.SecondCommand.Request(targetEntityId, request);

            SendSecondCommandCommand(commandRequest, callback);
        }