private IContractBehavior ContractBehavior(ILocator locator, Type serviceType)
		{
			var provider =
				locator.IsRegistered(contractType) ?
					(IContractBehavior)new LocatorInstanceProvider(locator, contractType) :
					new ActivatorInstanceProvider(serviceType);

			return provider;
		}
Beispiel #2
0
 public object GetService(Type serviceType)
 {
     return(locator.IsRegistered(serviceType) ? locator.Resolve(serviceType) : null);
 }