Represents a type that can extract System.Type objects from an Assembly instance.
Наследование: ITypeExtractor
Пример #1
0
        public void TypeExtractorMustListTypesFromGivenAssembly()
        {
            Assembly targetAssembly = typeof(SampleClass).Assembly;

            ITypeExtractor extractor = new TypeExtractor();
            IEnumerable<Type> results = extractor.GetTypes(targetAssembly);
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Count() > 0);
        }
Пример #2
0
 /// <summary>
 /// Initializes the class with a set of <see cref="IActionLoader{TTarget,Type}"/>
 /// instances that will be used to load the target assembly.
 /// </summary>
 /// <param name="getTypeLoaders">The delegate that will return the actual list of typeloaders.</param>
 public AssemblyActionLoader(Func <IList <IActionLoader <TTarget, Type> > > getTypeLoaders)
 {
     _getTypeLoaders = getTypeLoaders;
     TypeExtractor   = new TypeExtractor();
 }