private IEnumerable <TypeDefinition> GetMatchedTypes() { foreach (var assemblyDefinition in assembly.GetMatchedAssemblies()) { foreach (var module in assemblyDefinition.Modules) { foreach (var type in module.Types) { if (typeDiscovery(type)) { yield return(type); } } } } }
private IEnumerable <TypeDefinition> GetAllTypes() { return(assembly.GetMatchedAssemblies() .SelectMany(a => a.Modules) .SelectMany(m => m.Types)); }