示例#1
0
        public static ITypeScanner ScanAssembly(this IScannerRegistry registry, string assembly)
        {
            Guard.IsNotNull(registry, "registry");
            Guard.IsNotNull(assembly, "assembly");

            return(registry.ScanAssembly(Assembly.Load(assembly)));
        }
示例#2
0
        public static ITypeScanner ScanAssembly(this IScannerRegistry registry, Assembly assembly)
        {
            Guard.IsNotNull(registry, "registry");
            Guard.IsNotNull(assembly, "assembly");

            var source = new FilteredTypeSource(t => t.IsConcreteClass(), new AssemblyTypeSource(assembly));

            return(registry.Scan(source));
        }
示例#3
0
        public static ITypeScanner ScanAssemblyContaining <T>(this IScannerRegistry registry)
        {
            Guard.IsNotNull(registry, "registry");

            return(registry.ScanAssembly(typeof(T).Assembly));
        }
示例#4
0
        public static ITypeScanner ScanThisAssembly(this IScannerRegistry registry)
        {
            Guard.IsNotNull(registry, "registry");

            return(registry.ScanAssembly(Assembly.GetCallingAssembly()));
        }