public void SendCmdCommand(ComponentWithNoFieldsWithCommands.Cmd.Request request, Action <Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedResponse> callback = null) { int validCallbackEpoch = callbackEpoch; var requestId = commandSender.SendCommand(request, entity); if (callback != null) { Action <Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedResponse> wrappedCallback = response => { if (!this.IsValid || validCallbackEpoch != this.callbackEpoch) { return; } callback(response); }; callbackSystem.RegisterCommandResponseCallback(requestId, wrappedCallback); } }
public void SendCmdCommand(EntityId targetEntityId, global::Improbable.Gdk.Tests.ComponentsWithNoFields.Empty request, Action <global::Improbable.Gdk.Tests.ComponentsWithNoFields.ComponentWithNoFieldsWithCommands.Cmd.ReceivedResponse> callback = null) { var commandRequest = new ComponentWithNoFieldsWithCommands.Cmd.Request(targetEntityId, request); SendCmdCommand(commandRequest, callback); }