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); } }
public IEnumerable <IInterceptor> CreateInterceptors(ConstructorInfo constructor, IServiceContainer container) { return(from attribute in InterceptorAttribute.GetAttributes(constructor, false) orderby attribute.Order select attribute.CreateInterceptor(container)); }