用户完成下载后我想做一些事情
public class TestController : Controller
{
public FilePathResult Index()
{
return File("path/to/file", "mime");
}
}
我尝试将以下事件添加到测试控制器,但它们都在用户完成下载之前触发(除了它永远不会被调用的析构函数)
protected override void EndExecute(IAsyncResult asyncResult)
{
base.EndExecute(asyncResult);
}
protected override void EndExecuteCore(IAsyncResult asyncResult)
{
base.EndExecuteCore(asyncResult);
}
protected override void OnActionExecuted(ActionExecutedContext filterContext)
{
base.OnActionExecuted(filterContext);
}
protected override void OnResultExecuted(ResultExecutedContext filterContext)
{
base.OnResultExecuted(filterContext);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
~TestController()
{
//
}