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

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

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

            SendFirstCommandCommand(commandRequest, callback);
        }