/// <summary> /// Get and serve configuration document response. /// </summary> public static OkObjectResult Execute(HttpRequest req, IKLog klog) { try { string cfkKey = req.Query["key"]; string cfgApp = req.Query["app"]; if (string.IsNullOrEmpty(cfkKey)) { klog.Info("NULL CFG KEY"); return(new OkObjectResult(null)); } if (string.IsNullOrEmpty(cfgApp)) { klog.Info("NULL APP KEY"); return(new OkObjectResult(null)); } klog.Info($"CfgKey: {cfkKey}, CfkApp: {cfgApp}"); var document = GetCfg(cfkKey, cfgApp); if (document != null) { klog.Info($"PASS"); return(new OkObjectResult(document)); } else { klog.Error($"FAIL: NULL DOC"); return(new OkObjectResult(null)); } } catch (Exception ex) { klog.Error($"Exception: {ex.ToString()}"); return(new OkObjectResult(null)); } }
private static void TestMethod(IKLog kLog) { kLog.Info("Test Method Info"); }