public virtual GetClientsCommandResponse GetClientsCommand(GetClientsCommandRequest request)
        {
            var response = new GetClientsCommandResponse();

            try {
                // Raise Initialization Event
                var initialization = GetClientsCommandInitialization;
                if (initialization != null)
                {
                    initialization(request, response);
                }
                // Raise Execute Event
                var execute = GetClientsCommandExecute;
                if (execute != null)
                {
                    response = execute(request);
                }
                // Raise Complete Event
                var complete = GetClientsCommandComplete;
                if (complete != null)
                {
                    complete(request, response);
                }
            }
            catch (Exception exception) {
                // Raise Error Event
                var error = GetClientsCommandError;
                if (error != null)
                {
                    error(request, response, exception);
                }
            }
            return(response);
        }
Exemplo n.º 2
0
        public override GetClientsCommandResponse OnGetClientsCommandExecute(GetClientsCommandRequest request)
        {
            var response = new GetClientsCommandResponse();

            try
            {
                response.GetClientsResponse = _apiCommands.ApiGetClients();
            }
            catch (Exception ex)
            {
                response.Exception = ex;
                response.Message   = ex.Message;
            }
            return(response);
        }
 public abstract GetClientsCommandResponse OnGetClientsCommandExecute(GetClientsCommandRequest request);