Beispiel #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public static IResponseResult Execute(this WeaverRequest pRequest, string pHostName, int pPort)
        {
            var ctx  = new RexConnContext(pRequest, pHostName, pPort);
            var data = new RexConnDataAccess(ctx);

            return(data.Execute());
        }
Beispiel #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public IDataResult Execute(string pName)
        {
            ExecuteName = pName;

            var             data = new RexConnDataAccess(vRexConnCtx);
            IResponseResult rr   = null;

            if (vPreExecute != null)
            {
                vPreExecute(this, data);
            }

            try {
                rr = data.Execute();
            }
            catch (ResponseErrException ree) {
                if (vPostExecuteErr != null)
                {
                    vPostExecuteErr(this, ree);
                }

                throw new DataAccessException(this, ree.Message);
            }
            catch (Exception e) {
                if (vPostExecuteErr != null)
                {
                    vPostExecuteErr(this, e);
                }

                throw;
            }

            if (vPostExecute != null)
            {
                vPostExecute(this, rr);
            }

            LogAction(rr);
            return(new DataResult(rr));
        }