title: What's the best way to tell if a method is a property from within Policy Injection?
body: <p>I've got a custom handler applied to a class (using the Policy Injection Application Block in entlib 4) and I would like to know whether the input method is a property when Invoke is called.  Following is what my handler looks like.</p>
  
  <pre><code>[ConfigurationElementType(typeof(MyCustomHandlerData))]
  public class MyCustomHandler : ICallHandler
  {
      public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
      {
          if (input.MethodBase.IsPublic &amp;&amp; (input.MethodBase.Name.Contains("get_") || input.MethodBase.Name.Contains("set_")))
          {
              Console.WriteLine("MyCustomHandler Invoke called with input of {0}", input.MethodBase.Name);
          }
          return getNext().Invoke(input, getNext);
      }
  
      public int Order { get; set; }
  }
  </code></pre>
  
  <p>As you can see from my code sample, the best way I've thought of so far is by parsing the method name.  Isn't there a better way to do this?</p>