public void ScanCurrentAssemblyAllServices() { var attributes = _scanner.scan(Assembly.GetExecutingAssembly()); Assert.Equal(8, attributes.Count); AssertImpl(attributes, typeof(ServiceImpl), typeof(IHiFiveService)); AssertImpl(attributes, typeof(ServiceImpl), typeof(ISayHelloService)); AssertImpl(attributes, typeof(ServiceImpl), typeof(IPingService)); AssertImpl(attributes, typeof(ServiceImpl), typeof(IPongService)); }
/// <summary> /// Adds all the classes annotted with <see cref="ServiceImplementationAttribute"/> in the assembly calling /// this method. /// </summary> public SCBuilder AddCurrentAssembly() { var curr = Assembly.GetCallingAssembly(); return(ScanAssembly(() => _scanner.scan(curr))); }