我得到了要触发的请求过滤器属性,但响应过滤器永远不会触发。我错过了什么?
[MyResponse]
[MyRequest]
public class MyService : Service
{
public object Get(RequestDto request)
{
return new {foo = "bar"};
}
}
public class MyResponseAttribute : ResponseFilterAttribute
{
public override void Execute(IHttpRequest req, IHttpResponse res, object requestDto)
{
var x = requestDto;
}
}
public class MyRequestAttribute : RequestFilterAttribute
{
public override void Execute(IHttpRequest req, IHttpResponse res, object responseDto)
{
var x = responseDto;
}
}