Exemplo n.º 1
0
        public IContainerBuilder AddStatic <TService>()
        {
            var serviceType = typeof(TService);

            _descriptionMap[serviceType] = new StaticServiceDescriptor(this, serviceType, serviceType, null);
            return(this);
        }
Exemplo n.º 2
0
        public IContainerBuilder AddStatic <TService>(Func <Abstractions.IServiceProvider, TService> implementationFactory) where TService : class
        {
            var serviceType = typeof(TService);

            _descriptionMap[serviceType] = new StaticServiceDescriptor(this, serviceType, serviceType, implementationFactory);
            return(this);
        }
Exemplo n.º 3
0
        public IContainerBuilder AddStatic <TService, TImplementation>()
            where TImplementation : class, TService
        {
            var serviceType = typeof(TService);

            _descriptionMap[serviceType] = new StaticServiceDescriptor(this, serviceType, typeof(TImplementation), null);
            return(this);
        }