title: How to get constructor named arguments from attribute
body: <p>I have the same problem as <a href="https://stackoverflow.com/questions/15922236/how-to-get-constructor-arguments-name-in-attributes-with-net">this question</a>. The problem is that, even when using named arguments in the attribute's constructor, I still get an empty collection.</p>
  <p>This is my Attribute definition:</p>
  <pre><code>public class MenuItemAttribute : Attribute
  {
      ApplicationCategoryEnum ApplicationCategory { get; }
      string ControllerDisplayName { get; }
      bool IsDefaultRoute { get; }
  
      public MenuItemAttribute(ApplicationCategoryEnum applicationCategory, string controllerDisplayName, bool isDefaultRoute)
      {
          ControllerDisplayName = controllerDisplayName;
          ApplicationCategory = applicationCategory;
          IsDefaultRoute = isDefaultRoute;
      }
  }
  </code></pre>
  <p>and this is how I use it:</p>
  <pre><code>[MenuItem(
      applicationCategory: ApplicationCategoryEnum.CONTROLPANEL,
      controllerDisplayName: &quot;Account Management&quot;,
      isDefaultRoute: false)]
  public class AccountController : Controller { /// }
  </code></pre>
  <p>This is how I get through the Controller's attributes:</p>
  <pre><code>var attributeData = controllerInfo
      .CustomAttributes
      .FirstOrDefault(attrs =&gt; attrs.AttributeType == typeof(MenuItemAttribute))
      .NamedArguments;
  </code></pre>
  <p>Arguments are there as I can see them if I use <code>ConstructorArguments</code> instead of <code>NamedArguments</code>.</p>
  <p>What am I missing?</p>