ResolveTypes() 공개 메소드

Resolves all instances of the type registered on the service.
Note that the actual implementation lays in the hands of the IoC technique being used.
The is null.
public ResolveTypes ( Type serviceType ) : IEnumerable
serviceType System.Type The type of the service.
리턴 IEnumerable
예제 #1
0
 public void ReturnsAllAvaliableInstances()
 {
     var serviceLocator = new ServiceLocator { AutoRegisterTypesViaAttributes = true };
     serviceLocator.RegisterInstance(typeof(IFooService), new FooService2(), "FooService3");
     Assert.AreEqual(3, serviceLocator.ResolveTypes<IFooService>().Count());
 }