コード例 #1
0
        // GET: Home
        public async Task<ActionResult> Index()
        {
            TestClass testClass = new TestClass();

            CamelCasePropertyNamesContractResolver rrr = new CamelCasePropertyNamesContractResolver();

            var context = System.Web.HttpContext.Current.Check();
            var syncContext = TaskScheduler.FromCurrentSynchronizationContext();
            await Task.Run(() =>
            {
                var ttt = Thread.CurrentThread;
            });



            //return Content(testClass.ToJson());

            return Json(testClass.ToObject(o => o.Id = 1), JsonRequestBehavior.AllowGet);
        }