Example #1
0
        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)));
        }
Example #2
0
    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));
    }
Example #3
0
    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));
    }
Example #4
0
        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)));
        }