title: Get parameter's value of a Data Annotation
body: <h2>The goal</h2>
  
  <p>Get parameter's value of a Data Annotation.</p>
  
  <h2>The problem</h2>
  
  <p>I don't know the syntax.</p>
  
  <h2>The scenario</h2>
  
  <p>There is the following controller on my application:</p>
  
  <pre><code>[PermissionsFilter(Roles = "Administrator")]
  public ActionResult Index()
  {
      return View();
  }
  </code></pre>
  
  <p>And there is the following method on my application:</p>
  
  <pre><code>protected override bool AuthorizeCore(HttpContextBase httpContext)
  {
      return true;
  }
  </code></pre>
  
  <p>What I need seems to be simple: <strong>how do I get the <code>Administrator</code> string on the <code>AuthorizeCore</code> method?</strong> Is via <code>httpContext</code> parameter?</p>
  
  <h2>Knowledge spotlight</h2>
  
  <p>The <code>AuthorizeCore</code> is within of <code>PermissionFilters</code> class that implements <code>AuthorizeAttribute</code>. In other words, I'm overriding the <code>AuthorizeCore</code> method of <code>Authorize</code> attribute to create a new one (PermissionFilters attribute).</p>