Esempio n. 1
0
 private void SendCommandRequest <TRequest, TResponse>(AbstractCommand <TRequest, TResponse> command, object context) where TRequest : AbstractRequest where TResponse : AbstractResponse
 {
     if (command != null)
     {
         command.AddSuccessCallback(new AbstractCommand <TRequest, TResponse> .OnSuccessCallback(this.OnActionCommandSuccess));
         command.AddFailureCallback(new AbstractCommand <TRequest, TResponse> .OnFailureCallback(this.OnActionCommandFailure));
         command.Context = context;
         Service.Get <ServerAPI>().Sync(command);
     }
 }