Пример #1
0
        private static JsonResult generateJSONResult(FHIRResponse resp)
        {
            string r = resp.ToString();

            if (string.IsNullOrEmpty(r))
            {
                r = "{}";
            }
            JsonResult jr = new JsonResult(JObject.Parse(r));

            jr.StatusCode  = (int)resp.StatusCode;
            jr.ContentType = "application/json";
            return(jr);
        }
        public static ContentResult genContentResult(FHIRResponse resp, ILogger log)
        {
            string r = "{}";

            if (resp != null)
            {
                r = resp.ToString();
            }
            int sc = (int)resp.StatusCode;

            return(new ContentResult()
            {
                Content = r, StatusCode = sc, ContentType = "application/json"
            });
        }