Exemple #1
0
        public void SendSecondCommandCommand(BlittableComponent.SecondCommand.Request request, Action <Improbable.Gdk.Tests.BlittableTypes.BlittableComponent.SecondCommand.ReceivedResponse> callback = null)
        {
            int validCallbackEpoch = callbackEpoch;
            var requestId          = commandSender.SendCommand(request, entity);

            if (callback != null)
            {
                Action <Improbable.Gdk.Tests.BlittableTypes.BlittableComponent.SecondCommand.ReceivedResponse> wrappedCallback = response =>
                {
                    if (!this.IsValid || validCallbackEpoch != this.callbackEpoch)
                    {
                        return;
                    }

                    callback(response);
                };
                callbackSystem.RegisterCommandResponseCallback(requestId, wrappedCallback);
            }
        }
Exemple #2
0
        public void SendSecondCommandCommand(EntityId targetEntityId, global::Improbable.Gdk.Tests.BlittableTypes.SecondCommandRequest request, Action <global::Improbable.Gdk.Tests.BlittableTypes.BlittableComponent.SecondCommand.ReceivedResponse> callback = null)
        {
            var commandRequest = new BlittableComponent.SecondCommand.Request(targetEntityId, request);

            SendSecondCommandCommand(commandRequest, callback);
        }