I have an WCF Interceptor which gets called on every request:
public class WebServiceInterceptor : IDispatchMessageInspector
{
public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
{
var action = OperationContext.Current.IncomingMessageHeaders.Action;
var name = instanceContext.GetServiceInstance().GetType().Name;
if (action != null)
{
var operationName = action.Substring(action.LastIndexOf("/", StringComparison.OrdinalIgnoreCase) + 1);
}
return null;
}
public void BeforeSendReply(ref Message reply, object correlationState)
{
}
}
how can I get the name of the Method of the Service class that will be invoked? I want to get an attribute from this method.