public IContainerBuilder AddStatic <TService>() { var serviceType = typeof(TService); _descriptionMap[serviceType] = new StaticServiceDescriptor(this, serviceType, serviceType, null); return(this); }
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); }
public IContainerBuilder AddStatic <TService, TImplementation>() where TImplementation : class, TService { var serviceType = typeof(TService); _descriptionMap[serviceType] = new StaticServiceDescriptor(this, serviceType, typeof(TImplementation), null); return(this); }