public long SendSecondCommandRequest(EntityId entityId, global::Improbable.Gdk.Tests.BlittableTypes.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);
                }
예제 #2
0
                public long SendSecondCommandRequest(EntityId entityId, global::Improbable.Gdk.Tests.BlittableTypes.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);
                }
 public void SendResponseFailure(string message)
 {
     entityManager.GetComponentData <CommandResponders.SecondCommand>(entity).ResponsesToSend
     .Add(SecondCommand.CreateResponseFailure(Request, message));
 }
 public void SendResponse(global::Improbable.Gdk.Tests.BlittableTypes.SecondCommandResponse payload)
 {
     entityManager.GetComponentData <CommandResponders.SecondCommand>(entity).ResponsesToSend
     .Add(SecondCommand.CreateResponse(Request, payload));
 }