private async Task <string> InitializeAPI(string tempPageName, ReuseableParams reuseableParams, int siteID) { ControllerInoker objCntrlInvoker = new ControllerInoker(); List <ControllerDetail> lstApsExtraCompsInvoker = new List <ControllerDetail>(); Dictionary <string, ControllerDetail> objAPIResult = await objCntrlInvoker.EditLoadAPI(tempPageName, reuseableParams, lstApsExtraCompsInvoker, siteID); Newtonsoft.Json.JsonSerializerSettings jss = new Newtonsoft.Json.JsonSerializerSettings { ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore }; return(Newtonsoft.Json.JsonConvert.SerializeObject(objAPIResult, jss)); }
private async Task <string> APIStringResult(bool isPreview, string pageName, ReuseableParams objReuseableParams, List <ControllerDetail> lstApsExtraCompsInvoker, int siteID) { ControllerInoker objCntrlInvoker = new ControllerInoker(); Dictionary <string, ControllerDetail> objAPIResult; if (isPreview) { objAPIResult = await objCntrlInvoker.ViewLoadAPI(pageName, objReuseableParams, lstApsExtraCompsInvoker, siteID); } else { objAPIResult = await objCntrlInvoker.ViewLoadAPIPublished(pageName, objReuseableParams, lstApsExtraCompsInvoker, siteID); } Newtonsoft.Json.JsonSerializerSettings jss = new Newtonsoft.Json.JsonSerializerSettings { ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore }; return(Newtonsoft.Json.JsonConvert.SerializeObject(objAPIResult, jss)); }