title: Checking for an attribute in an action filter
body: <p>In MVC 5, you can do something like this inside an <code>IActionFilter</code>, to check if an attribute has been declared on the the current action (or at controller scope)</p>
  
  <pre><code>public void OnActionExecuting(ActionExecutingContext filterContext)
  {
      // Stolen from System.Web.Mvc.AuthorizeAttribute
      var isAttributeDefined = filterContext.ActionDescriptor.IsDefined(typeof(CustomAttribute), true) ||
                               filterContext.ActionDescriptor.ControllerDescriptor.IsDefined(typeof(CustomAttribute), true);
  
  }
  </code></pre>
  
  <p>So if your controller defines the attribute like so, this works.</p>
  
  <pre><code>[CustomAttribute]
  public ActionResult Everything()
  { .. }
  </code></pre>
  
  <p>Is it possible to do the same in ASP.NET Core MVC (inside an <code>IActionFiler</code>)?</p>