/// <summary> /// Get report settings from database or session (or generate default settings) /// </summary> JObject getJson(int id, string defaultTitle) { string reportType = OriginalMethod.ToLower(); dynamic json = null; if ((PostParameters == null || PostParameters["json"] == null) && SessionData.Report != null) { json = SessionData.Report[reportType]; } if (json == null || json.idReport != id || json.ReportType.ToString().ToLower() != reportType) { json = readReport(id, OriginalMethod, defaultTitle); } return(json); }
/// <summary> /// Set up any report /// </summary> /// <param name="json">The posted report parameters</param> void initialiseReport(JObject json) { string reportType = OriginalMethod.ToLower().Replace("save", ""); Utils.Check(json.AsString("ReportType").ToLower() == reportType, "Invalid report type"); dynamic r = SessionData.Report; if (r == null) { SessionData.Report = r = new JObject(); } r[reportType] = json; _fields = new List <DecimalField>(); _series = new List <ChartField>(); _filters = new List <Reports.Filter>(); }
public override MethodReference GetElementMethod() { return(OriginalMethod.GetElementMethod()); }
static void MM_Init(object detour) { _original = detour.GenerateTrampolineEx <OriginalMethod>(); }
public void CallOriginal(object _this, object[] _params) { Unhook(); OriginalMethod.Invoke(_this, _params); ApplyHook(); }
public OriginalMethodContainer(OriginalMethod contained) => origMethod = contained;