public IContainerConfiguration RegisterInstance(Type serviceType, object instance, string serviceName = null) { var identity = new ServiceIdentity(serviceType, serviceName); var activatorConfiguration = new InstanceActivatorConfiguration <object>(identity, instance); return(Register(activatorConfiguration)); }
public IInstanceActivatorConfiguration UsingInstance(object instance) { var configuration = new InstanceActivatorConfiguration <object>(Identity, instance); Configuration = configuration; return(configuration); }
public IContainerConfiguration RegisterInstance <TService>(TService instance, string serviceName = null) where TService : class { var serviceType = typeof(TService); var identity = new ServiceIdentity(serviceType, serviceName); var activatorConfiguration = new InstanceActivatorConfiguration <TService>(identity, instance); return(Register(activatorConfiguration)); }