Ejemplo n.º 1
0
        public object GetService(Type serviceType)
        {
            if (!_container.IsRegistered(serviceType))
            {
                return(null);
            }

            return(_container.Resolve(serviceType));
        }
 public TService Resolve <TService>()
 {
     return((TService)_scope.Resolve(typeof(TService)));
 }
 /// <summary>
 /// Get a specific service
 /// </summary>
 /// <typeparam name="T">Service to find</typeparam>
 /// <returns>Implementation</returns>
 public T Resolve <T>() where T : class
 {
     return(_childContainer.Resolve <T>());
 }
Ejemplo n.º 4
0
 public TService Resolve <TService>()
 {
     return((TService)_container.Resolve(typeof(TService)));
 }
Ejemplo n.º 5
0
 public object Resolve(Type concreteHandlerType)
 {
     return(_scope.Resolve(concreteHandlerType));
 }