title: Overriding ResourceFilter on Controller With One From Action Method
body: <p>I am using ASP.NET Core 2.2  I have a ResourceFilter that takes some arguments. I am using the ResourceFilter on my controller. What I would like to do is use the same filter type with different arguments on a specific action in that controller. </p>
  
  <p>I have something like:</p>
  
  <pre><code>public class MyRequestFilter : IResourceFilter
  {
      private readonly string[] _someValues;
  
      MyRequestFilter(string[] someValues)
      {
          _someValues = someValues;
      }
  
      public void OnResourceExecuting(ResourceExecutingContext context)
      {
          // do some checks here using _someValues
      }
  }
  
  </code></pre>
  
  <p>I use it on my controller like:</p>
  
  <pre><code>[TypeFilter(typeof(MyRequestFilter),
      IsReusable = false,
      Arguments = new object[] {
          new[]{"some value",
          "another value"}})]
  public class MyController : Controller
  {
  
  }
  </code></pre>
  
  <p>What I would like to do is override that filter on a specific action method. Something like:</p>
  
  <pre><code>[TypeFilter(typeof(MyRequestFilter),
      IsReusable = false,
      Arguments = new object[] {
          new[]{"value for this action",
          "another value just for this action"}})]
  public async Task&lt;IActionResult&gt; MyAction()
  {
  
  }
  </code></pre>
  
  <p>When I try the above and make a request to the endpoint that action is bound to I am seeing MyRequestFilter.OnResourceExecuting() get invoked
  with an instance that has the properties that were passed into the attribute on the controller. If I comment out the controller filter then
  I see the filter with values I passed in on the method. My question is - is there a way to tell the method to ignore the controllers filter
  for this specific route and use the filter defined on the method's attribute instead? Any advice would be appreciated. Thanks much!</p>