builder.RegisterFilterProvider();
它可以在过滤器上注入一种财产,如:
[TestFilter]
public ActionResult SomeAction(){...}
But can not inject a global filter register at global.asax like
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new TestFilterAttribute());
}
我怎么做呢?