38 lines
		
	
	
		
			903 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			903 B
		
	
	
	
		
			C#
		
	
	
	
	
	
 | 
						|
using System;
 | 
						|
using System.Configuration;
 | 
						|
using APT.WebApi.Models;
 | 
						|
using Microsoft.AspNetCore.Mvc;
 | 
						|
 | 
						|
namespace APT.HM.WebApi.Controllers
 | 
						|
{
 | 
						|
    [Route("Home")]
 | 
						|
    public class HomeController : Controller
 | 
						|
    {
 | 
						|
        private string AppContent;
 | 
						|
        [HttpGet, Route("Index")]
 | 
						|
        public string Index()
 | 
						|
        {
 | 
						|
            return "APT接口平台PP";
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// GET AOP测试 AsyncActionFilter日志异步
 | 
						|
        /// </summary>
 | 
						|
        /// <returns></returns>
 | 
						|
        [HttpGet()]
 | 
						|
        [Route("AsyncGetLog")]
 | 
						|
        //[TypeFilter(typeof(CustomAsyncActionFilterAttribute))]
 | 
						|
        public IActionResult AsyncGetLog(int id)
 | 
						|
        {
 | 
						|
            return new JsonResult(new 
 | 
						|
            {
 | 
						|
                Success = true,
 | 
						|
                Data = "AOP AsyncActionFilter 测试",
 | 
						|
                Time = DateTime.Now.ToString()
 | 
						|
 | 
						|
            });
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |