Пример #1
0
		private IContractBehavior ContractBehavior(ILocator locator, Type serviceType)
		{
			var provider =
				locator.IsRegistered(contractType) ?
					(IContractBehavior)new LocatorInstanceProvider(locator, contractType) :
					new ActivatorInstanceProvider(serviceType);

			return provider;
		}
Пример #2
0
 public object GetService(Type serviceType)
 {
     return(locator.IsRegistered(serviceType) ? locator.Resolve(serviceType) : null);
 }