Exemplo n.º 1
0
 private IEnumerable <InterceptorAttribute> GetInterceptorAttributes(MethodInfo interfaceMethod, MethodInfo implementMethod)
 {
     if (interfaceMethod != null)
     {
         foreach (var attr in InterceptorAttribute.GetAttributes(interfaceMethod, true))
         {
             yield return(attr);
         }
     }
     foreach (var attr in InterceptorAttribute.GetAttributes(implementMethod, true))
     {
         yield return(attr);
     }
 }
Exemplo n.º 2
0
 public IEnumerable <IInterceptor> CreateInterceptors(ConstructorInfo constructor, IServiceContainer container)
 {
     return(from attribute in InterceptorAttribute.GetAttributes(constructor, false)
            orderby attribute.Order
            select attribute.CreateInterceptor(container));
 }