public static void Scan(this IServiceRegistry services, Action <IAssemblyScanner> scan) { var scanner = new AssemblyScanner(); scan(scanner); scanner.Configure(services); }
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)); }
public static void Scan(this IServiceRegistry services, Action<IAssemblyScanner> scan) { var scanner = new AssemblyScanner(); scan(scanner); scanner.Configure(services); }