public static Task <IEnumerable <Type> > FindTypes(Assembly assembly, TypeClassification classification, Func <Type, bool> filter = null) { var query = new TypeQuery(classification, filter); return(_assemblies[assembly].ContinueWith(t => query.Find(t.Result))); }
public static Task<IEnumerable<Type>> FindTypes(Assembly assembly, TypeClassification classification, Func<Type, bool> filter = null) { var query = new TypeQuery(classification, filter); return _assemblies[assembly].ContinueWith(t => query.Find(t.Result)); }
public static Task<IEnumerable<Type>> FindTypes(IEnumerable<Assembly> assemblies, TypeClassification classification, Func<Type, bool> filter = null) { var query = new TypeQuery(classification, filter); var tasks = assemblies.Select(assem => _assemblies[assem].ContinueWith(t => query.Find(t.Result))).ToArray(); return Task.Factory.ContinueWhenAll(tasks, results => results.SelectMany(x => x.Result)); }
public static Task <IEnumerable <Type> > FindTypes(IEnumerable <Assembly> assemblies, TypeClassification classification, Func <Type, bool> filter = null) { var query = new TypeQuery(classification, filter); var tasks = assemblies.Select(assem => _assemblies[assem].ContinueWith(t => query.Find(t.Result))).ToArray(); return(Task.Factory.ContinueWhenAll(tasks, results => results.SelectMany(x => x.Result))); }