Example #1
0
        public IContainerBuilder AddStatic <TService>()
        {
            var serviceType = typeof(TService);

            _descriptionMap[serviceType] = new StaticServiceDescriptor(this, serviceType, serviceType, null);
            return(this);
        }
Example #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);
        }
Example #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);
        }