Exemplo n.º 1
0
        public TService GetService <TService>()
        {
            var s = IocContainer.GetServiceType(typeof(TService));

            return((TService)Activator.CreateInstance(s.CurrentType));
        }
Exemplo n.º 2
0
        public object GetSingle(Type serviceType)
        {
            var s = IocContainer.GetServiceType(serviceType);

            return(s.Singleton ?? (s.Singleton = Activator.CreateInstance(s.CurrentType)));
        }