Esempio n. 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());
        }
Esempio n. 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));
        }
Esempio n. 3
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 protected virtual void OnDataPreExecute(IDataAccess pAccess, RexConnDataAccess pRexConnData)
 {
     //int n = pRexConnData.Context.Request.CmdList.Count;
     //Log.Debug(ContextId, "Data", "PreExec commands: "+n);
 }