I have implemented IOperationInvoker to customize the WCF invokation. In Invoke method I want to access custom attributes of the method which is invoked by OperationInvoker. I have written the following code. But, it's not giving the custom attributes which are specified on that method.
public MyOperationInvoker(IOperationInvoker operationInvoker, DispatchOperation dispatchOperation)
{
this.operationInvoker = operationInvoker;
}
public object Invoke(object instance, object[] inputs, out object[] outputs)
{
MethodInfo mInfo=(MethodInfo)this.operationInvoker.GetType().GetProperty("Method").
GetValue(this.operationInvoker, null);
object[] objCustomAttributes = methodInfo.GetCustomAttributes(typeof(MyAttribute), true);
}