I am trying to access a custom attribute applied to a method inside a lock interceptor, for example:
[MyCustomAttribute(SomeParam = "attributeValue")] public virtual MyEntity Entity { get; set; }
using the following code:
internal class MyInterceptor : IInterceptor { public void Intercept(IInvocation invocation) { if (invocation.Method.GetCustomAttributes(typeof(MyCustomAttribute), true) != null) {
The interceptor fires OK when the method is called, but this code does not return a user attribute. How can I achieve this?
source share