title: Authorisation Attribute
body: <p>I have a WPF application from a client that I need to add a IsInRoleAtrribute to for certain methods in a class.</p>
  
  <p>So I created my IsInRole class like this, as a test;</p>
  
  <pre><code>namespace CustomAttributeSample
  {
      [System.AttributeUsage(System.AttributeTargets.Method)]
      public class IsInRoleAttribute : Attribute
      {
          public string Role { get; set; }
  
          public IsInRoleAttribute()
          {
              //open the xml file
              XmlDocument xmlDocument = new XmlDocument();
              xmlDocument.Load("Data.xml");
          }
  
          public override bool Match(object obj)
          {
              return false;
          }
  
          public override bool Equals (object obj)
          {
              return false;
          }
      }
  }
  </code></pre>
  
  <p>And I decorate my method like this, again as a test so far;</p>
  
  <pre><code>    [IsInRole(Role="Admin")]
      private bool Save()
      {
  </code></pre>
  
  <p>However I cannot prevent the method from being executed. </p>
  
  <p>I can do this in MVC no probs but this is my first WPF application in a number of years so I know I'm missing something here.</p>