/// <summary> /// <para>관리되는 대상 목록의 조건에 만족하는 타입을 반환합니다. </para> /// <para>.NET Framework 4.0 빌드는 병렬적으로 작업을 처리합니다.</para> /// </summary> /// <returns> /// 조건에 만족하는 타입 목록입니다. /// </returns> public override IEnumerable<Type> GetMatchingTypes() { #if NET40 BlockingCollection<Type> blockedTypeCollection = new BlockingCollection<Type>(); Parallel.ForEach( this.types, (type, loop) => { if( type.IsDependencyAttribute() ) blockedTypeCollection.Add(type); }); return blockedTypeCollection.AsEnumerable(); #else foreach (var type in this.types) { if (type.IsDependencyAttribute()) { yield return type; } else if ( type.IsDynamicAttribute() ) { yield return type; } } #endif }
/// <summary> /// <para>관리되는 대상 목록의 조건에 만족하는 타입을 반환합니다. </para> /// <para>.NET Framework 4.0 빌드는 병렬적으로 작업을 처리합니다.</para> /// </summary> /// <returns> /// 조건에 만족하는 타입 목록입니다. /// </returns> public override IEnumerable <Type> GetMatchingTypes() { #if NET40 BlockingCollection <Type> blockedTypeCollection = new BlockingCollection <Type>(); Parallel.ForEach(this.types, (type, loop) => { if (type.IsDependencyAttribute()) { blockedTypeCollection.Add(type); } }); return(blockedTypeCollection.AsEnumerable()); #else foreach (var type in this.types) { if (type.IsDependencyAttribute()) { yield return(type); } else if (type.IsDynamicAttribute()) { yield return(type); } } #endif }
protected override IEnumerable <Task> GetScheduledTasks() { return(_jobQueue.AsEnumerable()); }