コード例 #1
0
ファイル: TypeRepository.cs プロジェクト: forki/structuremap
        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)));
        }
コード例 #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));
    }
コード例 #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));
    }
コード例 #4
0
ファイル: TypeRepository.cs プロジェクト: forki/structuremap
        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)));
        }