예제 #1
0
        private bool IsMethodBootstrapInterceptorNeeded(IEnumerable <Type> types)
        {
            var methodInterceptorsMap = AopInterceptorContainer.FindInterceptors(AttributeTargets.Method);

            return(types.SelectMany(type => MethodSelector.GetAllMethods(type))
                   .SelectMany(m => m.GetCustomAttributes())
                   .Select(attr => attr.GetType())
                   .Any(attrType => methodInterceptorsMap.ContainsKey(attrType)));
        }