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