public IEnumerable <MethodInfo> GetMethods(LibType type) { var attributeType = _targetLibAssembly.GetType(type.FullName()); bool methodFilter(MethodInfo info) => info.GetCustomAttributes(false) .Any(attributeType.IsInstanceOfType); IEnumerable <MethodInfo> methodSelector(Type t) => _reflectionWrapper.GetMethods(t).Where(methodFilter); return(AssembliesReferencingGaugeLib.SelectMany(assembly => assembly.GetTypes().SelectMany(methodSelector))); }
public IEnumerable <MethodInfo> GetMethods(LibType type) { var attributeType = _targetLibAssembly.ExportedTypes.First(x => x.FullName == type.FullName()); IEnumerable <MethodInfo> MethodSelector(Type t) { return(_reflectionWrapper.GetMethods(t) .Where(info => info.GetCustomAttributes(false).Any(attributeType.IsInstanceOfType))); } return(AssembliesReferencingGaugeLib.SelectMany(assembly => assembly.ExportedTypes.SelectMany(MethodSelector))); }