コード例 #1
0
        public static void Scan(this IServiceRegistry services, Action <IAssemblyScanner> scan)
        {
            var scanner = new AssemblyScanner();

            scan(scanner);
            scanner.Configure(services);
        }
コード例 #2
0
        public void should_add_implementations_of_plugin_type()
        {
            _scanner
            .Applies
            .ToAssemblyContainingType <IMultiInstance>();

            _scanner
            .AddAllTypesOf <IMultiInstance>();

            _scanner
            .Configure(_registry);

            var services = _registry.ServicesFor <IMultiInstance>();

            services.ShouldContain(def => def.Type == typeof(Instance1));
            services.ShouldContain(def => def.Type == typeof(Instance2));
        }
コード例 #3
0
 public static void Scan(this IServiceRegistry services, Action<IAssemblyScanner> scan)
 {
     var scanner = new AssemblyScanner();
     scan(scanner);
     scanner.Configure(services);
 }